diff options
| author | Elliott Hughes <enh@google.com> | 2018-11-27 22:24:57 -0800 |
|---|---|---|
| committer | Elliott Hughes <enh@google.com> | 2018-11-28 09:29:51 -0800 |
| commit | 9c8957dd84679fa2ea32cbfe80d7dbe2f4a490fc (patch) | |
| tree | d1b592788516838a264925026ef672b0c7617095 /tools | |
| parent | 23b729e17ed437d19583f70e63d1fc8a85b5dae4 (diff) | |
| download | art-9c8957dd84679fa2ea32cbfe80d7dbe2f4a490fc.tar.gz art-9c8957dd84679fa2ea32cbfe80d7dbe2f4a490fc.tar.bz2 art-9c8957dd84679fa2ea32cbfe80d7dbe2f4a490fc.zip | |
Fix "performance-for-range-copy" error.
Not sure why this only shows up with -std=c++17, but it's clearly
correct:
art/tools/hiddenapi/hiddenapi.cc:1063:45: error: the loop variable's type is not a reference type; this creates a copy in each iteration; consider making this a reference [performance-for-range-copy,-warnings-as-errors]
Bug: http://b/111067277
Test: builds
Change-Id: I3796d275b142db3de40e7a855a8130ecea6212ae
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/hiddenapi/hiddenapi.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/hiddenapi/hiddenapi.cc b/tools/hiddenapi/hiddenapi.cc index 7f4c546df5..7c93a8b283 100644 --- a/tools/hiddenapi/hiddenapi.cc +++ b/tools/hiddenapi/hiddenapi.cc @@ -1060,7 +1060,7 @@ class HiddenApi final { // Write into public/private API files. std::ofstream file_public(out_public_path_.c_str()); std::ofstream file_private(out_private_path_.c_str()); - for (const std::pair<std::string, bool> entry : boot_members) { + for (const std::pair<const std::string, bool>& entry : boot_members) { if (entry.second) { file_public << entry.first << std::endl; } else { |
