From 21d8fd86774bd1ca5ed815ae2ec7587b558ee9d1 Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Mon, 14 Mar 2016 21:05:38 +0100 Subject: [PATCH] Use Boolean value directly instead of executing conditional statement. --- src/propgrid/manager.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/propgrid/manager.cpp b/src/propgrid/manager.cpp index 51e22b0c62..29cfb3de29 100644 --- a/src/propgrid/manager.cpp +++ b/src/propgrid/manager.cpp @@ -1079,10 +1079,11 @@ bool wxPropertyGridManager::IsPageModified( size_t index ) const { wxCHECK_MSG( index < GetPageCount(), false, wxS("Invalid page index") ); - if ( m_arrPages[index]->GetStatePtr()->m_anyModified ) - return true; - - return false; +#if WXWIN_COMPATIBILITY_3_0 + return m_arrPages[index]->GetStatePtr()->m_anyModified != (unsigned char)false; +#else + return m_arrPages[index]->GetStatePtr()->m_anyModified; +#endif } // -----------------------------------------------------------------------