From 18899ce4bca3036144ad32ca4ddbe211572dc2da Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 7 Jul 2018 00:55:35 +0200 Subject: [PATCH] Replace WXMAX() macro in wxSearchCtrl code with wxMax() Don't invent yet another std::max-macro. We probably could just use the standard function instead but for now use wxMax(), for consistency with the rest of the code base. No real changes. --- src/generic/srchctlg.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/generic/srchctlg.cpp b/src/generic/srchctlg.cpp index eefc469fb9..6659dc6bd3 100644 --- a/src/generic/srchctlg.cpp +++ b/src/generic/srchctlg.cpp @@ -28,8 +28,7 @@ #if !wxUSE_NATIVE_SEARCH_CONTROL #include "wx/image.h" - -#define WXMAX(a,b) ((a)>(b)?(a):(b)) +#include "wx/utils.h" // ---------------------------------------------------------------------------- // constants @@ -1013,7 +1012,7 @@ wxBitmap wxSearchCtrl::RenderSearchBitmap( int x, int y, bool renderDrop ) mem.SetPen( wxPen(fg) ); mem.SetBrush( wxBrush(fg) ); int handleCornerShift = penWidth * 707 / 1000 / 2; // 707 / 1000 = 0.707 = 1/sqrt(2); - handleCornerShift = WXMAX( handleCornerShift, 1 ); + handleCornerShift = wxMax( handleCornerShift, 1 ); int handleBase = 4 * x / 20; int handleLength = 2*handleBase+1; wxPoint handlePolygon[] = @@ -1112,7 +1111,7 @@ wxBitmap wxSearchCtrl::RenderCancelBitmap( int x, int y ) mem.SetPen( wxPen(bg) ); mem.SetBrush( wxBrush(bg) ); int handleCornerShift = penWidth/2; - handleCornerShift = WXMAX( handleCornerShift, 1 ); + handleCornerShift = wxMax( handleCornerShift, 1 ); wxPoint handlePolygon[] = { wxPoint(-handleCornerShift,+handleCornerShift),