On Thursday, 29 April 2010 at 22:45, buginator wrote:
> After some more tinkering with the code, I finally found the issue
> that MSVC was having.  In short, a bool in c is a int, and in c++ a
> bool !=int.  It was always returning 256 on false, and  -858993663 on
> true.  For those that don't see what that is, here:
> false = 0x00000100, true = 0xcccccc01   make sense ?

No. Is this another Microsoft stupidity? Evalutating true to 1 and false to 0
seems to be required by the C++ standard (e.g.
http://stackoverflow.com/questions/356726/is-bool-a-basic-datatype-in-c). Or is
Warzone doing strange things again (that maybe weren't that strange when it was
C-only)? If it is a Microsoft problem, I propose switching to the following
bool type instead: http://thedailywtf.com/Articles/What_Is_Truth_0x3f_.aspx

_______________________________________________
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev

Reply via email to