diff options
Diffstat (limited to 'src/wasm.h')
-rw-r--r-- | src/wasm.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wasm.h b/src/wasm.h index beb2d340d..a5c163719 100644 --- a/src/wasm.h +++ b/src/wasm.h @@ -149,7 +149,8 @@ struct Literal { double f64; }; - Literal() : type(WasmType::none), f64(0) {} + 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) {} |