summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/AnnotationProcessor.cpp
diff options
context:
space:
mode:
authorChih-Hung Hsieh <chh@google.com>2018-12-11 11:09:20 -0800
committerChih-hung Hsieh <chh@google.com>2018-12-17 20:00:55 +0000
commita1b644e88cfe5319e9ada7ad24e6cd215a7ea402 (patch)
treee4b24972d2c59b6512cd981b3edf78b03f7c1add /tools/aapt2/java/AnnotationProcessor.cpp
parentd0c404cb21de6e86329b5ceb79d1459dd8f2f4cb (diff)
Fix performance-for-range-copy warnings
Bug: 30413223 Test: make with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=-*,performance* Change-Id: Ie481e88025a7a1f3abde8ff63420d5ccd8577e52
Diffstat (limited to 'tools/aapt2/java/AnnotationProcessor.cpp')
-rw-r--r--tools/aapt2/java/AnnotationProcessor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/aapt2/java/AnnotationProcessor.cpp b/tools/aapt2/java/AnnotationProcessor.cpp
index 8d91b0098c1f..a4610b2575b9 100644
--- a/tools/aapt2/java/AnnotationProcessor.cpp
+++ b/tools/aapt2/java/AnnotationProcessor.cpp
@@ -113,7 +113,7 @@ void AnnotationProcessor::AppendNewLine() {
void AnnotationProcessor::Print(Printer* printer) const {
if (has_comments_) {
std::string result = comment_.str();
- for (StringPiece line : util::Tokenize(result, '\n')) {
+ for (const StringPiece& line : util::Tokenize(result, '\n')) {
printer->Println(line);
}
printer->Println(" */");