From 8b4487369008701531138b2f5b044eeb18bd7c45 Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Sun, 6 Mar 2016 21:20:11 +0100 Subject: [PATCH] Use Boolean value directly instead of executing conditional statement. --- src/propgrid/manager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/propgrid/manager.cpp b/src/propgrid/manager.cpp index 482104a8c3..34332555fd 100644 --- a/src/propgrid/manager.cpp +++ b/src/propgrid/manager.cpp @@ -1077,9 +1077,9 @@ bool wxPropertyGridManager::IsAnyModified() const bool wxPropertyGridManager::IsPageModified( size_t index ) const { - if ( m_arrPages[index]->GetStatePtr()->m_anyModified ) - return true; - return false; + wxCHECK_MSG( index < GetPageCount(), false, wxS("Invalid page index") ); + + return m_arrPages[index]->GetStatePtr()->m_anyModified; } // -----------------------------------------------------------------------