aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/common/bit_field.h
diff options
context:
space:
mode:
authorGravatar bunnei <bunneidev@gmail.com>2014-12-22 00:12:43 -0500
committerGravatar bunnei <bunneidev@gmail.com>2014-12-22 00:12:43 -0500
commit2188af4a653d56fcaf59e90399beb2c355762140 (patch)
treeb9c5bf92b6cebe6ecb7de4685049afdbc54d839d /src/common/bit_field.h
parentb9ef8b3fd2a252142c89bc2a8e1facc9e81d9968 (diff)
parent0199a7d9ef26516779f73192dd41738ce4116c20 (diff)
Merge pull request #322 from chinhodado/master
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 c38a3fb0..8eab054b 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