c++ - C4800 error, compiling with Visual Studio 2013 -
visual studio 2013 compiler giving me warning c4800:
'uint32' : forcing value bool 'true' or 'false' following code. (evn->unk08 void* array)
why that? have added brackets safety. same error occurs != operator. there better way this?
if ((((uint32)(evn->unk08[2]) & 8)) == 0)
you can (and imo should) try extract part of expression variables , see if (and where) problem still occurs, e.g.
uint32 = reinterpret_cast<uint32>(evn->unk08[2]); bool issomeflagset = (something & 8) == 0; if (issomeflagset) { /* ... */ }
this does, apart avoiding getting lost in parens, serve readability , makes easier debug values of parts of expression, because stored in variables (hopefully meaningful) names.
Comments
Post a Comment