diff options
| author | Chih-Hung Hsieh <chh@google.com> | 2016-07-27 14:11:02 -0700 |
|---|---|---|
| committer | Chih-Hung Hsieh <chh@google.com> | 2016-07-27 14:11:02 -0700 |
| commit | 11a2ce8da33e0ec4be250fd85c47f706d6c91a10 (patch) | |
| tree | 8dcac528bfb17372727e475d8cfb20a7038463ea /Utils.cpp | |
| parent | 786c536e84ef29b9c885f15bf8cf9b92653962ec (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.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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="); |
