diff options
author | JF Bastien <github@jfbastien.com> | 2016-02-02 15:37:10 +0100 |
---|---|---|
committer | JF Bastien <github@jfbastien.com> | 2016-02-02 15:37:10 +0100 |
commit | b4ab45dca8698a1c65a85e6c767c42c3416cc1c5 (patch) | |
tree | 677b97ee53c3840b7a1d2d4790a208ae505cc577 /src/wasm.h | |
parent | 4044cbd8fe593a118456079eaddfb393c84b9e76 (diff) | |
parent | b20025479124b041c94f9bf6f8053eaa95e46c0c (diff) | |
download | binaryen-b4ab45dca8698a1c65a85e6c767c42c3416cc1c5.tar.gz binaryen-b4ab45dca8698a1c65a85e6c767c42c3416cc1c5.tar.bz2 binaryen-b4ab45dca8698a1c65a85e6c767c42c3416cc1c5.zip |
Merge pull request #166 from WebAssembly/explicit
Make Literal's ctors explicit
Diffstat (limited to 'src/wasm.h')
-rw-r--r-- | src/wasm.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/wasm.h b/src/wasm.h index a5c163719..6f889737b 100644 --- a/src/wasm.h +++ b/src/wasm.h @@ -151,12 +151,12 @@ struct Literal { Literal() : Literal(WasmType::none) {} explicit Literal(WasmType type) : type(type) { memset(&f64, 0, sizeof(f64)); } - Literal(int32_t init) : type(WasmType::i32), i32(init) {} - Literal(uint32_t init) : type(WasmType::i32), i32(init) {} - Literal(int64_t init) : type(WasmType::i64), i64(init) {} - Literal(uint64_t init) : type(WasmType::i64), i64(init) {} - Literal(float init) : type(WasmType::f32), f32(init) {} - Literal(double init) : type(WasmType::f64), f64(init) {} + explicit Literal(int32_t init) : type(WasmType::i32), i32(init) {} + explicit Literal(uint32_t init) : type(WasmType::i32), i32(init) {} + explicit Literal(int64_t init) : type(WasmType::i64), i64(init) {} + explicit Literal(uint64_t init) : type(WasmType::i64), i64(init) {} + explicit Literal(float init) : type(WasmType::f32), f32(init) {} + explicit Literal(double init) : type(WasmType::f64), f64(init) {} int32_t geti32() { assert(type == WasmType::i32); return i32; } int64_t geti64() { assert(type == WasmType::i64); return i64; } |