summaryrefslogtreecommitdiff
path: root/Utils.cpp
diff options
context:
space:
mode:
authorChih-Hung Hsieh <chh@google.com>2016-07-27 14:11:02 -0700
committerChih-Hung Hsieh <chh@google.com>2016-07-27 14:11:02 -0700
commit11a2ce8da33e0ec4be250fd85c47f706d6c91a10 (patch)
tree8dcac528bfb17372727e475d8cfb20a7038463ea /Utils.cpp
parent786c536e84ef29b9c885f15bf8cf9b92653962ec (diff)
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
Diffstat (limited to 'Utils.cpp')
-rw-r--r--Utils.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Utils.cpp b/Utils.cpp
index a9bddfa..97dea79 100644
--- a/Utils.cpp
+++ b/Utils.cpp
@@ -208,7 +208,7 @@ static status_t readMetadata(const std::string& path, std::string& fsType,
}
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=");