summaryrefslogtreecommitdiff
path: root/libfec
diff options
context:
space:
mode:
authorChih-Hung Hsieh <chh@google.com>2016-07-27 15:06:58 -0700
committerChih-Hung Hsieh <chh@google.com>2016-07-27 15:08:50 -0700
commita3b37f4d08e757ce90a7b02ca0e15951455c477c (patch)
tree6b8f918422e4490972a2d7b446ec79eeb46b68b0 /libfec
parenta33edd664d194e03ca25220f8657e2610449d632 (diff)
downloadextras-a3b37f4d08e757ce90a7b02ca0e15951455c477c.tar.gz
Fix clang-tidy performance warnings in libfec.
* Use const reference type for for-loop index variables to avoid unnecessary copy. Bug: 30413223 Change-Id: I9819261087a5385fe580f805be44a2407f35cdf5 Test: build with WITH_TIDY=1
Diffstat (limited to 'libfec')
-rw-r--r--libfec/fec_verity.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libfec/fec_verity.cpp b/libfec/fec_verity.cpp
index 393e9624..5dea53dd 100644
--- a/libfec/fec_verity.cpp
+++ b/libfec/fec_verity.cpp
@@ -349,7 +349,7 @@ static int parse_table(fec_handle *f, uint64_t offset, uint32_t size)
auto tokens = android::base::Split(table.get(), " ");
- for (const auto token : tokens) {
+ for (const auto& token : tokens) {
switch (i++) {
case 0: /* version */
if (token != stringify(VERITY_TABLE_VERSION)) {