Archived

This topic is now archived and is closed to further replies.

NogginBoink

Compiler warning I don't understand

Recommended Posts

NogginBoink    122
I can't understand why the compiler doesn't like this statement:
void CBox::SetDebugState(DWORD newState)
{
	m_CBOX_DRAW_WIREFRAME = ((newState || CBOX_DRAW_WIREFRAME) > 0);
}
  
I just want to set m_CBOX_DRAW_WIREFRAME to true or false, depending on the bitmask flags in newState. Logically, the expression makes sense to me, but the compiler warns: c:\path\cbox.cpp(307) : warning C4804: '>' : unsafe use of type 'bool' in operation What's that warning mean and how do I fix it? [edited by - NogginBoink on January 4, 2004 12:39:45 PM]

Share this post


Link to post
Share on other sites