aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/common/bit_field.h
diff options
context:
space:
mode:
authorGravatar Chin <chin.bimbo@gmail.com>2014-12-20 18:28:17 -0500
committerGravatar Chin <chin.bimbo@gmail.com>2014-12-21 10:58:55 -0500
commit0199a7d9ef26516779f73192dd41738ce4116c20 (patch)
tree1b1529ae3d9e4e8e3d47d96893571a2eeb9fa4a2 /src/common/bit_field.h
parent2e5869c9395c2304cfc43a28bf734c345f845b65 (diff)
More warning cleanups
Diffstat (limited to 'src/common/bit_field.h')
-rw-r--r--src/common/bit_field.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/common/bit_field.h b/src/common/bit_field.h
index 3ec061e6..7c633f01 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