From 64bcd668c74d9fb920800a073a748a053661eba3 Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Thu, 20 Aug 2015 20:54:46 +0200 Subject: [PATCH] Refactor wxPropertyGrid::GenerateEditorTextCtr, cont. Use Boolean expression instead of conditional statement to initialize Boolean value. --- src/propgrid/editors.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/propgrid/editors.cpp b/src/propgrid/editors.cpp index bbd509ac2a..ccd7137883 100644 --- a/src/propgrid/editors.cpp +++ b/src/propgrid/editors.cpp @@ -1926,10 +1926,7 @@ wxWindow* wxPropertyGrid::GenerateEditorTextCtrl( const wxPoint& pos, } // If the height is significantly higher, then use border, and fill the rect exactly. - bool hasSpecialSize = false; - - if ( (sz.y - m_lineHeight) > 5 ) - hasSpecialSize = true; + const bool hasSpecialSize = (sz.y - m_lineHeight) > 5; wxWindow* ctrlParent = GetPanel();