diff options
author | Lioncash <mathew1800@gmail.com> | 2018-08-21 06:39:42 -0400 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2018-08-21 06:39:45 -0400 |
commit | 36090521ce34303fc2c5d73b9da46748f6630ed8 (patch) | |
tree | ccbd41c1bc74ce7e8b7cb40d8aa427129b3c0c02 | |
parent | bf89a99839abb30e33872b8401eae30cd95e7585 (diff) |
bit_field: Convert ToBool() into explicit operator bool
Gets rid of a TODO that is long overdue.
-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; } |