summaryrefslogtreecommitdiff
path: root/startop/view_compiler/dex_builder.h
diff options
context:
space:
mode:
authorChih-Hung Hsieh <chh@google.com>2018-12-20 13:53:28 -0800
committerChih-Hung Hsieh <chh@google.com>2018-12-20 13:53:28 -0800
commit81aff0fbabf72354f635b07c714d5dedaa9a1419 (patch)
tree9b1354192919dc6a85576bd9eb829d07442f880b /startop/view_compiler/dex_builder.h
parentbcf293c674307a90238671edcf5c82b17e3bca62 (diff)
Fix/suppress startop google-explicit-constructor warnings
* Add explicit to conversion constructors/operators Bug: 28341362 Test: make with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=-*,google-explicit-constructor Change-Id: I9e7b929cfa65c68f4cdb4710c1c5c6760d56e4d5
Diffstat (limited to 'startop/view_compiler/dex_builder.h')
-rw-r--r--startop/view_compiler/dex_builder.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/startop/view_compiler/dex_builder.h b/startop/view_compiler/dex_builder.h
index 06059c8c6e56..757d863461f0 100644
--- a/startop/view_compiler/dex_builder.h
+++ b/startop/view_compiler/dex_builder.h
@@ -73,7 +73,7 @@ class TypeDescriptor {
bool operator<(const TypeDescriptor& rhs) const { return descriptor_ < rhs.descriptor_; }
private:
- TypeDescriptor(std::string descriptor) : descriptor_{descriptor} {}
+ explicit TypeDescriptor(std::string descriptor) : descriptor_{descriptor} {}
const std::string descriptor_;
};
@@ -83,7 +83,7 @@ class TypeDescriptor {
class Prototype {
public:
template <typename... TypeDescriptors>
- Prototype(TypeDescriptor return_type, TypeDescriptors... param_types)
+ explicit Prototype(TypeDescriptor return_type, TypeDescriptors... param_types)
: return_type_{return_type}, param_types_{param_types...} {}
// Encode this prototype into the dex file.