From 9b8528fee4eed35b8e887ded0851d08eb2b10db6 Mon Sep 17 00:00:00 2001 From: Chih-Hung Hsieh Date: Wed, 10 Aug 2016 14:15:30 -0700 Subject: 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 --- tools/aapt/ResourceTable.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tools/aapt/ResourceTable.cpp') diff --git a/tools/aapt/ResourceTable.cpp b/tools/aapt/ResourceTable.cpp index 4d5bb312aaf1..76c59dd57068 100644 --- a/tools/aapt/ResourceTable.cpp +++ b/tools/aapt/ResourceTable.cpp @@ -4081,7 +4081,7 @@ status_t ResourceTable::Type::applyPublicEntryOrder() j = 0; for (i=0; i e = origOrder.itemAt(i); + const sp& e = origOrder.itemAt(i); // There will always be enough room for the remaining entries. while (mOrderedConfigs.itemAt(j) != NULL) { j++; @@ -4203,7 +4203,7 @@ status_t ResourceTable::Package::applyPublicTypeOrder() size_t j=0; for (i=0; i t = origOrder.itemAt(i); + const sp& t = origOrder.itemAt(i); // There will always be enough room for the remaining types. while (mOrderedTypes.itemAt(j) != NULL) { j++; @@ -4636,7 +4636,7 @@ status_t ResourceTable::modifyForCompat(const Bundle* bundle) { c->getEntries(); const size_t entryCount = entries.size(); for (size_t ei = 0; ei < entryCount; ei++) { - sp e = entries.valueAt(ei); + const sp& e = entries.valueAt(ei); if (e == NULL || e->getType() != Entry::TYPE_BAG) { continue; } -- cgit v1.2.3-59-g8ed1b