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/Asyncify.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/Asyncify.cpp')
-rw-r--r-- | src/passes/Asyncify.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/passes/Asyncify.cpp b/src/passes/Asyncify.cpp index 5b96d6e86..7b03741d9 100644 --- a/src/passes/Asyncify.cpp +++ b/src/passes/Asyncify.cpp @@ -630,9 +630,7 @@ public: }); // Functions in the remove-list are assumed to not change the state. - for (auto& pair : scanner.map) { - auto* func = pair.first; - auto& info = pair.second; + for (auto& [func, info] : scanner.map) { if (removeList.match(func->name)) { info.inRemoveList = true; if (verbose && info.canChangeState) { @@ -645,9 +643,8 @@ public: // Remove the asyncify imports, if any, and any calls to them. std::vector<Name> funcsToDelete; - for (auto& pair : scanner.map) { - auto* func = pair.first; - auto& callsTo = pair.second.callsTo; + for (auto& [func, info] : scanner.map) { + auto& callsTo = info.callsTo; if (func->imported() && func->module == ASYNCIFY) { funcsToDelete.push_back(func->name); } |