summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChih-Hung Hsieh <chh@google.com>2016-07-12 12:13:07 -0700
committerChih-Hung Hsieh <chh@google.com>2016-07-12 12:13:07 -0700
commit37d87ae585d633a7410d4c67214ea369e7f51cf4 (patch)
tree24519a6715cc0440e9576c3acbe555022cfb8962
parentce32afbb304bbca521ec0333b41c82d736295ec7 (diff)
downloadtpm-nougat-mr1-wear-release.tar.gz
* Declare explicit conversion constructors. Bug: 28341362 Change-Id: If68be8b0d92fdaea99e54388fbe0104213926480 Test: build with clang-tidy
-rw-r--r--tpm_manager/server/binder_service.h4
-rw-r--r--trunks/trunks_binder_service.h2
-rw-r--r--trunks/trunks_client_test.cc2
3 files changed, 4 insertions, 4 deletions
diff --git a/tpm_manager/server/binder_service.h b/tpm_manager/server/binder_service.h
index c4de0c6..bda64ef 100644
--- a/tpm_manager/server/binder_service.h
+++ b/tpm_manager/server/binder_service.h
@@ -55,7 +55,7 @@ class BinderService : public brillo::Daemon {
friend class NvramServiceInternal;
class NvramServiceInternal : public android::tpm_manager::BnTpmNvram {
public:
- NvramServiceInternal(TpmNvramInterface* service);
+ explicit NvramServiceInternal(TpmNvramInterface* service);
~NvramServiceInternal() override = default;
// ITpmNvram interface.
@@ -95,7 +95,7 @@ class BinderService : public brillo::Daemon {
friend class OwnershipServiceInternal;
class OwnershipServiceInternal : public android::tpm_manager::BnTpmOwnership {
public:
- OwnershipServiceInternal(TpmOwnershipInterface* service);
+ explicit OwnershipServiceInternal(TpmOwnershipInterface* service);
~OwnershipServiceInternal() override = default;
// ITpmOwnership interface.
diff --git a/trunks/trunks_binder_service.h b/trunks/trunks_binder_service.h
index d9c8dec..d26730f 100644
--- a/trunks/trunks_binder_service.h
+++ b/trunks/trunks_binder_service.h
@@ -52,7 +52,7 @@ class TrunksBinderService : public brillo::Daemon {
friend class BinderServiceInternal;
class BinderServiceInternal : public android::trunks::BnTrunks {
public:
- BinderServiceInternal(TrunksBinderService* service);
+ explicit BinderServiceInternal(TrunksBinderService* service);
~BinderServiceInternal() override = default;
// ITrunks interface.
diff --git a/trunks/trunks_client_test.cc b/trunks/trunks_client_test.cc
index eb60b19..74b4305 100644
--- a/trunks/trunks_client_test.cc
+++ b/trunks/trunks_client_test.cc
@@ -841,7 +841,7 @@ bool TrunksClientTest::NvramTest(const std::string& owner_password) {
};
class Scoper {
public:
- Scoper(const base::Closure& callback) : callback_(callback) {}
+ explicit Scoper(const base::Closure& callback) : callback_(callback) {}
~Scoper() {
if (!cancel_)
callback_.Run();