diff options
author | Max Graey <maxgraey@gmail.com> | 2021-11-23 07:03:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-22 21:03:25 -0800 |
commit | 7f24fce21a92f2aed4a11745d27d5181798ba6cd (patch) | |
tree | 80655dc933e3c2ae3ae53b7960cd71a6a022c3da /src/passes/Metrics.cpp | |
parent | 37999167bb333dd0b12d744af8e633897e65cff8 (diff) | |
download | binaryen-7f24fce21a92f2aed4a11745d27d5181798ba6cd.tar.gz binaryen-7f24fce21a92f2aed4a11745d27d5181798ba6cd.tar.bz2 binaryen-7f24fce21a92f2aed4a11745d27d5181798ba6cd.zip |
Modernize code to C++17 (#3104)
Diffstat (limited to 'src/passes/Metrics.cpp')
-rw-r--r-- | src/passes/Metrics.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/passes/Metrics.cpp b/src/passes/Metrics.cpp index 4cd5d8ef4..566738161 100644 --- a/src/passes/Metrics.cpp +++ b/src/passes/Metrics.cpp @@ -170,11 +170,11 @@ struct Metrics std::vector<const char*> keys; // add total int total = 0; - for (auto i : counts) { - keys.push_back(i.first); + for (auto& [key, value] : counts) { + keys.push_back(key); // total is of all the normal stuff, not the special [things] - if (i.first[0] != '[') { - total += i.second; + if (key[0] != '[') { + total += value; } } keys.push_back("[total]"); |