소스 검색

Merge pull request #1139 from lioncash/bitfield

bit_field: Convert ToBool() into explicit operator bool
bunnei 8 년 전
부모
커밋
37f2ec6fc2
1개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 2
      src/common/bit_field.h

+ 1 - 2
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;
     }