summaryrefslogtreecommitdiff
path: root/src/wasm/wasm-binary.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm/wasm-binary.cpp')
-rw-r--r--src/wasm/wasm-binary.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wasm/wasm-binary.cpp b/src/wasm/wasm-binary.cpp
index 285fd578f..0f7647b72 100644
--- a/src/wasm/wasm-binary.cpp
+++ b/src/wasm/wasm-binary.cpp
@@ -220,7 +220,7 @@ void WasmBinaryWriter::writeTypes() {
o << S32LEB(BinaryConsts::EncodedType::Func);
for (auto& sigType : {sig.params, sig.results}) {
o << U32LEB(sigType.size());
- for (auto& type : sigType) {
+ for (const auto& type : sigType) {
o << binaryType(type);
}
}
@@ -386,7 +386,7 @@ void WasmBinaryWriter::writeGlobals() {
ModuleUtils::iterDefinedGlobals(*wasm, [&](Global* global) {
BYN_TRACE("write one\n");
size_t i = 0;
- for (auto& t : global->type) {
+ for (const auto& t : global->type) {
o << binaryType(t);
o << U32LEB(global->mutable_);
if (global->type.size() == 1) {