Fix harmless warning in wxCommandProcessor::IsDirty().
This fixes the warning for MSVC, which warned about "forcing value to bool 'true' or 'false'", without introducing one for gcc which would complain if we compared the value, of compatibility_iterator type, with NULL. This backports the changes of r75445 and r75653 from master.
This commit is contained in:
@@ -333,7 +333,10 @@ bool wxCommandProcessor::IsDirty() const
|
||||
{
|
||||
// We have never been saved, so we are dirty if and only if we have any
|
||||
// commands at all.
|
||||
return m_currentCommand;
|
||||
//
|
||||
// NB: The ugly "!!" test is needed to avoid warnings both from MSVC in
|
||||
// non-STL build and g++ in STL build.
|
||||
return !!m_currentCommand;
|
||||
}
|
||||
|
||||
if ( !m_currentCommand )
|
||||
|
||||
Reference in New Issue
Block a user