summaryrefslogtreecommitdiff
path: root/tools/aapt2/ResourceValues.h
diff options
context:
space:
mode:
authorChih-Hung Hsieh <chh@google.com>2016-08-10 14:15:30 -0700
committerChih-Hung Hsieh <chh@google.com>2016-08-11 15:16:41 -0700
commit9b8528fee4eed35b8e887ded0851d08eb2b10db6 (patch)
tree36df1cee89b3689454e6b09a6bfa5eabfb3214b1 /tools/aapt2/ResourceValues.h
parent7310353aeb771c109e5aea2c5415fa502eb13a7b (diff)
Fix clang-tidy warnings in aapt and aapt2.
* Add explicit keyword to conversion constructors. * Add NOLINT(implicit) comments for implicit conversion constructors. Bug: 28341362 * Use const reference type for read-only parameters. Bug: 30407689 * Use const reference type to avoid unnecessary copy. Bug: 30413862 Test: build with WITH_TIDY=1 Change-Id: Id6d21961f313a1ad92b15a37fdaa5be9e8ab48e1
Diffstat (limited to 'tools/aapt2/ResourceValues.h')
-rw-r--r--tools/aapt2/ResourceValues.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/aapt2/ResourceValues.h b/tools/aapt2/ResourceValues.h
index 8ae71ad82a60..e6af7166c08f 100644
--- a/tools/aapt2/ResourceValues.h
+++ b/tools/aapt2/ResourceValues.h
@@ -198,7 +198,7 @@ struct Id : public BaseItem<Id> {
struct RawString : public BaseItem<RawString> {
StringPool::Ref value;
- RawString(const StringPool::Ref& ref);
+ explicit RawString(const StringPool::Ref& ref);
bool equals(const Value* value) const override;
bool flatten(android::Res_value* outValue) const override;
@@ -209,7 +209,7 @@ struct RawString : public BaseItem<RawString> {
struct String : public BaseItem<String> {
StringPool::Ref value;
- String(const StringPool::Ref& ref);
+ explicit String(const StringPool::Ref& ref);
bool equals(const Value* value) const override;
bool flatten(android::Res_value* outValue) const override;
@@ -220,7 +220,7 @@ struct String : public BaseItem<String> {
struct StyledString : public BaseItem<StyledString> {
StringPool::StyleRef value;
- StyledString(const StringPool::StyleRef& ref);
+ explicit StyledString(const StringPool::StyleRef& ref);
bool equals(const Value* value) const override;
bool flatten(android::Res_value* outValue) const override;
@@ -237,7 +237,7 @@ struct FileReference : public BaseItem<FileReference> {
io::IFile* file = nullptr;
FileReference() = default;
- FileReference(const StringPool::Ref& path);
+ explicit FileReference(const StringPool::Ref& path);
bool equals(const Value* value) const override;
bool flatten(android::Res_value* outValue) const override;
@@ -252,7 +252,7 @@ struct BinaryPrimitive : public BaseItem<BinaryPrimitive> {
android::Res_value value;
BinaryPrimitive() = default;
- BinaryPrimitive(const android::Res_value& val);
+ explicit BinaryPrimitive(const android::Res_value& val);
BinaryPrimitive(uint8_t dataType, uint32_t data);
bool equals(const Value* value) const override;
@@ -272,7 +272,7 @@ struct Attribute : public BaseValue<Attribute> {
int32_t maxInt;
std::vector<Symbol> symbols;
- Attribute(bool w, uint32_t t = 0u);
+ explicit Attribute(bool w, uint32_t t = 0u);
bool equals(const Value* value) const override;
Attribute* clone(StringPool* newPool) const override;