Add explicit param onto operator bool() to not accidentally cast to int

This commit is contained in:
baldurk
2018-01-16 16:37:38 +00:00
parent 32af79bf8c
commit d9db39b7c8
@@ -60,7 +60,7 @@ public:
return *this;
}
// utility functions
operator bool() const { return words != NULL && offset < words->size(); }
explicit operator bool() const { return words != NULL && offset < words->size(); }
uint32_t &operator*() { return cur(); }
const uint32_t &operator*() const { return cur(); }
spv::Op opcode() { return spv::Op(cur() & spv::OpCodeMask); }