From 0997127e3790aed8d9e15dfc1dba14bbc876c4db Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 19 Jan 2014 19:03:28 +0000 Subject: [PATCH] Work around g++ warning about comparing compatibility_iterator with NULL. Use double negation to placate both it and MSVC, see r75445. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75653 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/cmdproc.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/common/cmdproc.cpp b/src/common/cmdproc.cpp index 40c2023ba8..413c25b994 100644 --- a/src/common/cmdproc.cpp +++ b/src/common/cmdproc.cpp @@ -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 != NULL; + // + // 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 )