From 0199a7d9ef26516779f73192dd41738ce4116c20 Mon Sep 17 00:00:00 2001 From: Chin Date: Sat, 20 Dec 2014 18:28:17 -0500 Subject: More warning cleanups --- src/common/bit_field.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/common') diff --git a/src/common/bit_field.h b/src/common/bit_field.h index 3ec061e63..7c633f01f 100644 --- a/src/common/bit_field.h +++ b/src/common/bit_field.h @@ -168,6 +168,12 @@ public: } } + // TODO: we may want to change this to explicit operator bool() if it's bug-free in VS2015 + __forceinline bool ToBool() const + { + return Value() != 0; + } + private: // StorageType is T for non-enum types and the underlying type of T if // T is an enumeration. Note that T is wrapped within an enable_if in the -- cgit v1.2.3