diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2016-07-27 23:21:41 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2016-07-27 23:21:42 +0000 |
commit | 1f6947bcd9f72696db68970c792f3eaea94f5479 (patch) | |
tree | ccf14438cb12c7716c52496195944fda0589ce99 /verity | |
parent | b40840ff742c8e41f76bae895e01cf4f798b1a79 (diff) | |
parent | a3b37f4d08e757ce90a7b02ca0e15951455c477c (diff) | |
download | extras-1f6947bcd9f72696db68970c792f3eaea94f5479.tar.gz |
Merge "Fix clang-tidy performance warnings in libfec."
Diffstat (limited to 'verity')
-rw-r--r-- | verity/fec/image.cpp | 2 | ||||
-rw-r--r-- | verity/fec/main.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/verity/fec/image.cpp b/verity/fec/image.cpp index a378c932..610a4627 100644 --- a/verity/fec/image.cpp +++ b/verity/fec/image.cpp @@ -290,7 +290,7 @@ bool image_load(const std::vector<std::string>& filenames, image *ctx, std::vector<int> fds; - for (auto fn : filenames) { + for (const auto& fn : filenames) { int fd = TEMP_FAILURE_RETRY(open(fn.c_str(), flags | O_LARGEFILE)); if (fd < 0) { diff --git a/verity/fec/main.cpp b/verity/fec/main.cpp index 50d807e2..0675fd6c 100644 --- a/verity/fec/main.cpp +++ b/verity/fec/main.cpp @@ -189,7 +189,7 @@ static int encode(image& ctx, const std::vector<std::string>& inp_filenames, size_t n = 1; - for (auto fn : inp_filenames) { + for (const auto& fn : inp_filenames) { INFO("\t%zu: '%s'\n", n++, fn.c_str()); } |