Original Post
Is it exactly euqal return m_flags & NODE_RENDERABLE; why ?
#define NODE_RENDERABLE 128m_flags = 129;// (m_flags & NODE_RENDERABLE) == 128// (0==(m_flags & NODE_RENDERABLE) == 0m_flags = 1;// (m_flags & NODE_RENDERABLE) == 0// (0==(m_flags & NODE_RENDERABLE) != 0
Quote:
Original post by Anonymous Poster
No, it is not necessarily the same.
You are using a bitwise operator, which means that (m_flags & NODE_RENDERABLE) can be equal to any number in the range of integers.
so return (m_flags & NODE_RENDERABLE) can return any integer.
Quote:
if (x) and if (x != false) are both much better than if (x == true)
This topic has been locked by a moderator. New replies are not allowed.
With your permission, GameDev.net uses analytics cookies to understand how people use the platform. You can accept analytics or continue with necessary cookies only. Learn more