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
Merged-In: Id6d21961f313a1ad92b15a37fdaa5be9e8ab48e1
This commit is contained in:
Chih-Hung Hsieh
2016-08-10 14:15:30 -07:00
parent d0197ac340
commit 8bd37ba458
46 changed files with 94 additions and 94 deletions

View File

@@ -35,7 +35,7 @@ struct JavaClassGeneratorTest : public ::testing::Test {
mTable->setPackageId(0x01);
}
bool addResource(const ResourceNameRef& name, ResourceId id) {
bool addResource(const ResourceNameRef& name, const ResourceId& id) {
return mTable->addResource(name, id, {}, SourceLine{ "test.xml", 21 },
util::make_unique<Id>());
}