diff options
author | Chih-Hung Hsieh <chh@google.com> | 2016-07-12 21:03:26 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2016-07-12 21:03:26 +0000 |
commit | a4b8a4b8ca47703d5e8f982b8993aef3ab0917a1 (patch) | |
tree | 097b27cdfabd729196b28de8ef65d3f40eb2a747 | |
parent | 46b0ebd73c8bdb7f61f3deedf906af80e7d23951 (diff) | |
parent | 692fda805ff9617c45bc280f81bece432110b50b (diff) | |
download | nvram-a4b8a4b8ca47703d5e8f982b8993aef3ab0917a1.tar.gz |
Fix google-explicit-constructor warnings in system/nvram. am: bb621b95ea
am: 692fda805f
Change-Id: I23411f5608daecb9b3044f4640ed651394e65d67
-rw-r--r-- | messages/include/nvram/messages/io.h | 2 | ||||
-rw-r--r-- | messages/include/nvram/messages/optional.h | 2 | ||||
-rw-r--r-- | messages/include/nvram/messages/proto.hpp | 4 | ||||
-rw-r--r-- | messages/include/nvram/messages/struct.h | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/messages/include/nvram/messages/io.h b/messages/include/nvram/messages/io.h index 08c1091..3957015 100644 --- a/messages/include/nvram/messages/io.h +++ b/messages/include/nvram/messages/io.h @@ -201,7 +201,7 @@ class NVRAM_EXPORT BlobOutputStreamBuffer : public OutputStreamBuffer { // Construct a |BlobOutputStreamBuffer| that stores all written data to // |blob|, which will get resized as necessary. Note that |blob| must remain // valid for the life time of the |BlobOutputStreamBuffer| object. - BlobOutputStreamBuffer(Blob* blob); + explicit BlobOutputStreamBuffer(Blob* blob); ~BlobOutputStreamBuffer() override = default; // Truncate the blob to match the current output size. diff --git a/messages/include/nvram/messages/optional.h b/messages/include/nvram/messages/optional.h index 2860e3e..01a49a6 100644 --- a/messages/include/nvram/messages/optional.h +++ b/messages/include/nvram/messages/optional.h @@ -24,7 +24,7 @@ namespace nvram { template <typename ValueType> class Optional { public: Optional() = default; - Optional(ValueType value) : value_(value), valid_(true) {} + explicit Optional(ValueType value) : value_(value), valid_(true) {} bool valid() const { return valid_; } const ValueType& value() const { return value_; } diff --git a/messages/include/nvram/messages/proto.hpp b/messages/include/nvram/messages/proto.hpp index aabeb8c..3254583 100644 --- a/messages/include/nvram/messages/proto.hpp +++ b/messages/include/nvram/messages/proto.hpp @@ -387,7 +387,7 @@ struct StructDescriptor<StructType, index_sequence<>> { template <typename StructType> class MessageEncoder : public MessageEncoderBase { public: - MessageEncoder(const StructType& object) + explicit MessageEncoder(const StructType& object) : MessageEncoderBase(&object, StructDescriptor<StructType>::kDescriptors, StructDescriptor<StructType>::kNumDescriptors) {} @@ -404,7 +404,7 @@ class MessageEncoder : public MessageEncoderBase { template <typename StructType> class MessageDecoder : public MessageDecoderBase { public: - MessageDecoder(StructType& object) + explicit MessageDecoder(StructType& object) : MessageDecoderBase(&object, StructDescriptor<StructType>::kDescriptors, StructDescriptor<StructType>::kNumDescriptors) {} diff --git a/messages/include/nvram/messages/struct.h b/messages/include/nvram/messages/struct.h index 13932fc..589666f 100644 --- a/messages/include/nvram/messages/struct.h +++ b/messages/include/nvram/messages/struct.h @@ -249,7 +249,7 @@ struct FieldSpecList<FieldSpec, Tail...> { using List = FieldSpecList<FieldSpec, Tail...>; using TailList = FieldSpecList<Tail...>; - constexpr FieldSpecList(FieldSpec field_spec, Tail... tail) + constexpr explicit FieldSpecList(FieldSpec field_spec, Tail... tail) : kFieldSpec(field_spec), kTail(tail...) {} template <size_t index> |