Skip to content

Commit 9bde263

Browse files
axickripken
authored andcommitted
Make input a const reference to WasmBinaryBuilder (#1367)
1 parent 14cb0c0 commit 9bde263

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/wasm-binary.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -802,7 +802,7 @@ class WasmBinaryWriter : public Visitor<WasmBinaryWriter, void> {
802802
class WasmBinaryBuilder {
803803
Module& wasm;
804804
MixedArena& allocator;
805-
std::vector<char>& input;
805+
const std::vector<char>& input;
806806
bool debug;
807807
std::istream* sourceMap;
808808
std::pair<uint32_t, Function::DebugLocation> nextDebugLocation;
@@ -814,7 +814,7 @@ class WasmBinaryBuilder {
814814
std::set<BinaryConsts::Section> seenSections;
815815

816816
public:
817-
WasmBinaryBuilder(Module& wasm, std::vector<char>& input, bool debug) : wasm(wasm), allocator(wasm.allocator), input(input), debug(debug), sourceMap(nullptr), nextDebugLocation(0, { 0, 0, 0 }), useDebugLocation(false) {}
817+
WasmBinaryBuilder(Module& wasm, const std::vector<char>& input, bool debug) : wasm(wasm), allocator(wasm.allocator), input(input), debug(debug), sourceMap(nullptr), nextDebugLocation(0, { 0, 0, 0 }), useDebugLocation(false) {}
818818

819819
void read();
820820
void readUserSection(size_t payloadLen);

0 commit comments

Comments
 (0)