From af87f23744477b034dcb1c59af2a1a208becab23 Mon Sep 17 00:00:00 2001 From: Daniel Wirtz Date: Thu, 20 Aug 2020 21:35:14 +0200 Subject: Use const modifier when dealing with types (#3064) Since they make the code clearer and more self-documenting. --- src/wasm/wasm-s-parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/wasm/wasm-s-parser.cpp') diff --git a/src/wasm/wasm-s-parser.cpp b/src/wasm/wasm-s-parser.cpp index 15ec266b3..931cd1bf0 100644 --- a/src/wasm/wasm-s-parser.cpp +++ b/src/wasm/wasm-s-parser.cpp @@ -641,7 +641,7 @@ SExpressionWasmBuilder::parseTypeUse(Element& s, // If only (type) is specified, populate `namedParams` if (!paramsOrResultsExist) { size_t index = 0; - for (auto& param : functionSignature.params) { + for (const auto& param : functionSignature.params) { namedParams.emplace_back(Name::fromInt(index++), param); } } -- cgit v1.2.3