projects
/
platform
/
upstream
/
SPIRV-Tools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2d89b6a
)
enum_set: Fix bool performance warning.
author
Jamie Madill
<jmadill@chromium.org>
Thu, 27 Oct 2016 20:09:06 +0000
(16:09 -0400)
committer
Jamie Madill
<jmadill@chromium.org>
Thu, 27 Oct 2016 20:09:06 +0000
(16:09 -0400)
Implicit casts from int to bool cause a warning in visual studio.
source/enum_set.h
patch
|
blob
|
history
diff --git
a/source/enum_set.h
b/source/enum_set.h
index
2ca6251
..
6f9be32
100644
(file)
--- 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();
}