Fix performance-for-range-copy warnings
Bug: 30413223
Test: make with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=-*,performance*
Change-Id: Ie481e88025a7a1f3abde8ff63420d5ccd8577e52
diff --git a/tools/aapt2/ResourceUtils.cpp b/tools/aapt2/ResourceUtils.cpp
index 82d9e04..99420de 100644
--- a/tools/aapt2/ResourceUtils.cpp
+++ b/tools/aapt2/ResourceUtils.cpp
@@ -360,7 +360,7 @@
return util::make_unique<BinaryPrimitive>(flags);
}
- for (StringPiece part : util::Tokenize(str, '|')) {
+ for (const StringPiece& part : util::Tokenize(str, '|')) {
StringPiece trimmed_part = util::TrimWhitespace(part);
bool flag_set = false;