Fix performance-for-range-copy warnings

Bug: 30413223
Test: make with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=-*,performance*
Change-Id: Ie481e88025a7a1f3abde8ff63420d5ccd8577e52
This commit is contained in:
Chih-Hung Hsieh
2018-12-11 11:09:20 -08:00
committed by Chih-hung Hsieh
parent d0c404cb21
commit a1b644e88c
14 changed files with 31 additions and 31 deletions

View File

@@ -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(" */");