From b371439d6fbc6b7b7cd5b4ef7046faa6cdf0e9e2 Mon Sep 17 00:00:00 2001 From: Jamie Madill Date: Thu, 27 Oct 2016 16:09:06 -0400 Subject: [PATCH] enum_set: Fix bool performance warning. Implicit casts from int to bool cause a warning in visual studio. --- source/enum_set.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/enum_set.h b/source/enum_set.h index 2ca6251..6f9be32 100644 --- a/source/enum_set.h +++ b/source/enum_set.h @@ -84,7 +84,7 @@ class EnumSet { bool Contains(uint32_t word) const { // We shouldn't call Overflow() since this is a const method. if (auto bits = AsMask(word)) { - return mask_ & bits; + return (mask_ & bits) != 0; } else if (auto overflow = overflow_.get()) { return overflow->find(word) != overflow->end(); } -- 2.7.4