Skip to content

VERY experimental Nintendo Switch 2 emulator

C++

bit_field: Convert ToBool() into explicit operator bool

Lioncashd6812d9e92c0
diff --git a/src/common/bit_field.h b/src/common/bit_field.h
index 65e357dec9..732201de78 100644
--- a/src/common/bit_field.h
+++ b/src/common/bit_field.h
@@ -178,8 +178,7 @@ public:
return ExtractValue(storage);
}
- // TODO: we may want to change this to explicit operator bool() if it's bug-free in VS2015
- constexpr FORCE_INLINE bool ToBool() const {
+ constexpr explicit operator bool() const {
return Value() != 0;
}