From 41201d661eeaf44ce87b535db71edf0f22bcdd77 Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Mon, 25 May 2015 22:45:40 +0200 Subject: [PATCH] Use embedded wxMax function to obtain largest of two values when calculating bitmap dimension. --- src/propgrid/propgrid.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/propgrid/propgrid.cpp b/src/propgrid/propgrid.cpp index 76cfd632d2..8425eec992 100644 --- a/src/propgrid/propgrid.cpp +++ b/src/propgrid/propgrid.cpp @@ -4656,9 +4656,8 @@ void wxPropertyGrid::OnResize( wxSizeEvent& event ) if ( !m_doubleBuffer ) { // Create double buffer bitmap to draw on, if none - int w = (width>250)?width:250; - int h = height + dblh; - h = (h>400)?h:400; + int w = wxMax(width, 250); + int h = wxMax(height + dblh, 400); m_doubleBuffer = new wxBitmap( w, h ); } else