Fix clang-tidy performance warnings in system/vold.
* Use const reference type for for-loop index variables
to avoid unnecessary copy.
Bug: 30413223
Change-Id: Id4d980ae8afec1374fc3be0b23f1c6a39bff86e0
Test: build with WITH_TIDY=1
diff --git a/Utils.cpp b/Utils.cpp
index a9bddfa..97dea79 100644
--- a/Utils.cpp
+++ b/Utils.cpp
@@ -208,7 +208,7 @@
}
char value[128];
- for (auto line : output) {
+ for (const auto& line : output) {
// Extract values from blkid output, if defined
const char* cline = line.c_str();
const char* start = strstr(cline, "TYPE=");