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:
Vadim Zeitlin
2015-04-17 13:27:49 +02:00
parent 669c5cd64c
commit 210040016e

View File

@@ -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 )