diff options
author | Alon Zakai <azakai@google.com> | 2019-11-12 15:40:30 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-12 15:40:30 -0800 |
commit | 5ee9e0a0e34da622e525a58b4cfa8ebab3a0b1a1 (patch) | |
tree | 6c5212fc6c4dd132bf85786e08741b863e5e8a85 /src | |
parent | 485de15c5233e2fbfc14e27f1ec0cfdecd6fb630 (diff) | |
download | binaryen-5ee9e0a0e34da622e525a58b4cfa8ebab3a0b1a1.tar.gz binaryen-5ee9e0a0e34da622e525a58b4cfa8ebab3a0b1a1.tar.bz2 binaryen-5ee9e0a0e34da622e525a58b4cfa8ebab3a0b1a1.zip |
Cast to bool after bitwise operations, to avoid an MSVC warning (#2431)
Fixes #2430
Diffstat (limited to 'src')
-rw-r--r-- | src/wasm-features.h | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/wasm-features.h b/src/wasm-features.h index a645c93a8..77759f9e8 100644 --- a/src/wasm-features.h +++ b/src/wasm-features.h @@ -67,16 +67,18 @@ struct FeatureSet { bool isMVP() const { return features == MVP; } bool has(Feature f) { return (features & f) == f; } - bool hasAtomics() const { return features & Atomics; } - bool hasMutableGlobals() const { return features & MutableGlobals; } - bool hasTruncSat() const { return features & TruncSat; } - bool hasSIMD() const { return features & SIMD; } - bool hasBulkMemory() const { return features & BulkMemory; } - bool hasSignExt() const { return features & SignExt; } - bool hasExceptionHandling() const { return features & ExceptionHandling; } - bool hasTailCall() const { return features & TailCall; } - bool hasReferenceTypes() const { return features & ReferenceTypes; } - bool hasAll() const { return features & All; } + bool hasAtomics() const { return bool(features & Atomics); } + bool hasMutableGlobals() const { return bool(features & MutableGlobals); } + bool hasTruncSat() const { return bool(features & TruncSat); } + bool hasSIMD() const { return bool(features & SIMD); } + bool hasBulkMemory() const { return bool(features & BulkMemory); } + bool hasSignExt() const { return bool(features & SignExt); } + bool hasExceptionHandling() const { + return bool(features & ExceptionHandling); + } + bool hasTailCall() const { return bool(features & TailCall); } + bool hasReferenceTypes() const { return bool(features & ReferenceTypes); } + bool hasAll() const { return bool(features & All); } void makeMVP() { features = MVP; } void set(Feature f, bool v = true) { |