summaryrefslogtreecommitdiff
path: root/src/wasm/wasm-s-parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm/wasm-s-parser.cpp')
-rw-r--r--src/wasm/wasm-s-parser.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wasm/wasm-s-parser.cpp b/src/wasm/wasm-s-parser.cpp
index 5e6008bca..15ec266b3 100644
--- a/src/wasm/wasm-s-parser.cpp
+++ b/src/wasm/wasm-s-parser.cpp
@@ -640,9 +640,9 @@ SExpressionWasmBuilder::parseTypeUse(Element& s,
// If only (type) is specified, populate `namedParams`
if (!paramsOrResultsExist) {
- const std::vector<Type>& funcParams = functionSignature.params.expand();
- for (size_t index = 0, e = funcParams.size(); index < e; index++) {
- namedParams.emplace_back(Name::fromInt(index), funcParams[index]);
+ size_t index = 0;
+ for (auto& param : functionSignature.params) {
+ namedParams.emplace_back(Name::fromInt(index++), param);
}
}