diff options
author | bunnei <bunneidev@gmail.com> | 2018-08-21 10:21:19 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-21 10:21:19 -0400 |
commit | 37f2ec6fc2b2347501667891f83a4a0fb21aa6c1 (patch) | |
tree | fd4d51f6cd5e8e11a3ff08ee2e93a3861a8eeb7b | |
parent | 624239ed6b601bbf5112c9d437a3be260f216e42 (diff) | |
parent | 36090521ce34303fc2c5d73b9da46748f6630ed8 (diff) |
Merge pull request #1139 from lioncash/bitfield
bit_field: Convert ToBool() into explicit operator bool
-rw-r--r-- | src/common/bit_field.h | 3 |
1 files changed, 1 insertions, 2 deletions
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; } |