diff options
author | JF Bastien <jfb@chromium.org> | 2016-02-02 06:14:34 -0800 |
---|---|---|
committer | JF Bastien <jfb@chromium.org> | 2016-02-02 06:14:34 -0800 |
commit | b20025479124b041c94f9bf6f8053eaa95e46c0c (patch) | |
tree | 677b97ee53c3840b7a1d2d4790a208ae505cc577 /src/wasm2asm.h | |
parent | 4044cbd8fe593a118456079eaddfb393c84b9e76 (diff) | |
download | binaryen-b20025479124b041c94f9bf6f8053eaa95e46c0c.tar.gz binaryen-b20025479124b041c94f9bf6f8053eaa95e46c0c.tar.bz2 binaryen-b20025479124b041c94f9bf6f8053eaa95e46c0c.zip |
Make Literal's ctors explicit
This tends to avoid silly mistakes, which I'm worried about after adding an explicit ctor with the enum WasmType parameter. See 'C++ Coding Standards: 101 Rules, Guidelines, and Best Practices' rule #40 'avoid providing implicit conversion'.
Diffstat (limited to 'src/wasm2asm.h')
-rw-r--r-- | src/wasm2asm.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wasm2asm.h b/src/wasm2asm.h index 69abf9c3f..76ccbf8b6 100644 --- a/src/wasm2asm.h +++ b/src/wasm2asm.h @@ -919,7 +919,7 @@ Ref Wasm2AsmBuilder::processFunctionBody(Expression* curr, IString result) { case f32: { Ref ret = ValueBuilder::makeCall(MATH_FROUND); Const fake; - fake.value = double(curr->value.f32); + fake.value = Literal(double(curr->value.f32)); fake.type = f64; ret[2]->push_back(visitConst(&fake)); return ret; |