summaryrefslogtreecommitdiff
path: root/src/binary-reader-interp.cc
diff options
context:
space:
mode:
authorBen Smith <binjimin@gmail.com>2017-12-09 15:29:26 -0800
committerGitHub <noreply@github.com>2017-12-09 15:29:26 -0800
commit72e7fd34dc143f2ea0d5f134834e57a41b29ab77 (patch)
tree41a99ff8305952155106e5cde94f1e394c7ac4c7 /src/binary-reader-interp.cc
parenta8306f4e1c2d995aab30514cac3219e449325469 (diff)
downloadwabt-72e7fd34dc143f2ea0d5f134834e57a41b29ab77.tar.gz
wabt-72e7fd34dc143f2ea0d5f134834e57a41b29ab77.tar.bz2
wabt-72e7fd34dc143f2ea0d5f134834e57a41b29ab77.zip
[cleanup] Always use braces with if (#691)
Diffstat (limited to 'src/binary-reader-interp.cc')
-rw-r--r--src/binary-reader-interp.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/binary-reader-interp.cc b/src/binary-reader-interp.cc
index 884ffe58..cfe2b041 100644
--- a/src/binary-reader-interp.cc
+++ b/src/binary-reader-interp.cc
@@ -446,8 +446,9 @@ wabt::Result BinaryReaderInterp::EmitDropKeep(uint32_t drop, uint8_t keep) {
wabt::Result BinaryReaderInterp::AppendFixup(
IstreamOffsetVectorVector* fixups_vector,
Index index) {
- if (index >= fixups_vector->size())
+ if (index >= fixups_vector->size()) {
fixups_vector->resize(index + 1);
+ }
(*fixups_vector)[index].push_back(GetIstreamOffset());
return wabt::Result::Ok;
}
@@ -1025,8 +1026,9 @@ wabt::Result BinaryReaderInterp::OnDataSegmentData(Index index,
return wabt::Result::Error;
}
- if (size > 0)
+ if (size > 0) {
data_segment_infos_.emplace_back(&memory->data[address], src_data, size);
+ }
return wabt::Result::Ok;
}