From 96e24e73d64c15025302c09be28d835c81b85420 Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Sun, 28 Apr 2019 17:14:24 +0200 Subject: [PATCH] Use conditional operator instead of conditional statement This notation is more intuitive in this context. --- src/propgrid/advprops.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/propgrid/advprops.cpp b/src/propgrid/advprops.cpp index b1956d974f..2446b117f3 100644 --- a/src/propgrid/advprops.cpp +++ b/src/propgrid/advprops.cpp @@ -948,10 +948,7 @@ void wxSystemColourProperty::Init( int type, const wxColour& colour ) { wxColourPropertyValue cpv; - if ( colour.IsOk() ) - cpv.Init( type, colour ); - else - cpv.Init( type, *wxWHITE ); + cpv.Init(type, colour.IsOk() ? colour : *wxWHITE); m_flags |= wxPG_PROP_STATIC_CHOICES; // Colour selection cannot be changed.