summaryrefslogtreecommitdiff
path: root/src/wasm-binary.h
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-01-14 16:16:55 -0800
committerAlon Zakai <alonzakai@gmail.com>2016-01-14 16:16:55 -0800
commit1897786b3643095ab3560afac6b8171885e5b6d2 (patch)
tree8947c0781f292e0922dee55f2de71dace717257f /src/wasm-binary.h
parent1e80630b009ecd5e63206353292fd63197ac9bdd (diff)
downloadbinaryen-1897786b3643095ab3560afac6b8171885e5b6d2.tar.gz
binaryen-1897786b3643095ab3560afac6b8171885e5b6d2.tar.bz2
binaryen-1897786b3643095ab3560afac6b8171885e5b6d2.zip
minor binary updates following comments
Diffstat (limited to 'src/wasm-binary.h')
-rw-r--r--src/wasm-binary.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wasm-binary.h b/src/wasm-binary.h
index 233722aa5..1eb82dc44 100644
--- a/src/wasm-binary.h
+++ b/src/wasm-binary.h
@@ -541,7 +541,7 @@ public:
void finishUp() {
if (debug) std::cerr << "finishUp" << std::endl;
// finish buffers
- for (auto& buffer : buffersToWrite) {
+ for (const auto& buffer : buffersToWrite) {
if (debug) std::cerr << "writing buffer" << (int)buffer.data[0] << "," << (int)buffer.data[1] << " at " << o.size() << " and pointer is at " << buffer.pointerLocation << std::endl;
o.writeAt(buffer.pointerLocation, (uint32_t)o.size());
for (size_t i = 0; i < buffer.size; i++) {
@@ -552,7 +552,7 @@ public:
// AST writing via visitors
- int depth;
+ int depth; // only for debugging
void recurse(Expression*& curr) {
if (debug) std::cerr << "zz recurse into " << ++depth << " at " << o.size() << std::endl;
@@ -1161,7 +1161,7 @@ public:
// AST reading
- int depth;
+ int depth; // only for debugging
void readExpression(Expression*& curr) {
if (debug) std::cerr << "zz recurse into " << ++depth << " at " << pos << std::endl;