summaryrefslogtreecommitdiff
path: root/src/wasm/wasm-s-parser.cpp
diff options
context:
space:
mode:
authorMax Graey <maxgraey@gmail.com>2021-11-23 07:03:25 +0200
committerGitHub <noreply@github.com>2021-11-22 21:03:25 -0800
commit7f24fce21a92f2aed4a11745d27d5181798ba6cd (patch)
tree80655dc933e3c2ae3ae53b7960cd71a6a022c3da /src/wasm/wasm-s-parser.cpp
parent37999167bb333dd0b12d744af8e633897e65cff8 (diff)
downloadbinaryen-7f24fce21a92f2aed4a11745d27d5181798ba6cd.tar.gz
binaryen-7f24fce21a92f2aed4a11745d27d5181798ba6cd.tar.bz2
binaryen-7f24fce21a92f2aed4a11745d27d5181798ba6cd.zip
Modernize code to C++17 (#3104)
Diffstat (limited to 'src/wasm/wasm-s-parser.cpp')
-rw-r--r--src/wasm/wasm-s-parser.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/wasm/wasm-s-parser.cpp b/src/wasm/wasm-s-parser.cpp
index d9c35d97c..9a537586e 100644
--- a/src/wasm/wasm-s-parser.cpp
+++ b/src/wasm/wasm-s-parser.cpp
@@ -908,9 +908,7 @@ void SExpressionWasmBuilder::preParseHeapTypes(Element& module) {
types = builder.build();
- for (auto& pair : typeIndices) {
- auto name = pair.first;
- auto index = pair.second;
+ for (auto& [name, index] : typeIndices) {
auto type = types[index];
// A type may appear in the type section more than once, but we canonicalize
// types internally, so there will be a single name chosen for that type. Do