diff options
author | Chih-Hung Hsieh <chh@google.com> | 2016-08-10 14:15:30 -0700 |
---|---|---|
committer | Chih-Hung Hsieh <chh@google.com> | 2016-08-11 15:16:41 -0700 |
commit | 9b8528fee4eed35b8e887ded0851d08eb2b10db6 (patch) | |
tree | 36df1cee89b3689454e6b09a6bfa5eabfb3214b1 /tools/aapt2/Resource.h | |
parent | 7310353aeb771c109e5aea2c5415fa502eb13a7b (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/Resource.h')
-rw-r--r-- | tools/aapt2/Resource.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/aapt2/Resource.h b/tools/aapt2/Resource.h index 0ba034520563..09a04e0f2afb 100644 --- a/tools/aapt2/Resource.h +++ b/tools/aapt2/Resource.h @@ -100,7 +100,7 @@ struct ResourceNameRef { ResourceNameRef() = default; ResourceNameRef(const ResourceNameRef&) = default; ResourceNameRef(ResourceNameRef&&) = default; - ResourceNameRef(const ResourceName& rhs); + ResourceNameRef(const ResourceName& rhs); // NOLINT(implicit) ResourceNameRef(const StringPiece& p, ResourceType t, const StringPiece& e); ResourceNameRef& operator=(const ResourceNameRef& rhs) = default; ResourceNameRef& operator=(ResourceNameRef&& rhs) = default; @@ -126,7 +126,7 @@ struct ResourceId { ResourceId(); ResourceId(const ResourceId& rhs); - ResourceId(uint32_t resId); + ResourceId(uint32_t resId); // NOLINT(implicit) ResourceId(uint8_t p, uint8_t t, uint16_t e); bool isValid() const; |