Quote:
Originally Posted by Dyndrilliac
...
Ok, I don't know how else to say this. What the **** do you think NULL is? It's a constant for zero. If a piece of data can only be a one or a zero, it is a boolean. Not a pointer to the instance of a class. Do you know why? Because if it were a pointer to the instance of a class, checking for one would not work. The data would be the address at memory where the instance of the class is located, and thus the gamestate check function that was posted would fail.
|
Not in game:
In game:
Just because you can apply boolean logic to it, doesn't mean that it was implemented as a boolean by the Blizzard programmer.
The code posted in this thread doesn't check for one either, it checks for 0.
( It could be heavily improved by using boolean logic, though )