From 93318b26281e35989f5da5de256db718e94de457 Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Sun, 24 May 2020 19:11:22 +0200 Subject: [PATCH] Use dedicated function to round values --- src/osx/window_osx.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/osx/window_osx.cpp b/src/osx/window_osx.cpp index 1e58f4c1ab..e53690f4a9 100644 --- a/src/osx/window_osx.cpp +++ b/src/osx/window_osx.cpp @@ -1339,13 +1339,13 @@ void wxWindowMac::DoGetTextExtent(const wxString& str, delete ctx; if ( externalLeading ) - *externalLeading = (wxCoord)(e+0.5); + *externalLeading = (wxCoord)wxRound(e); if ( descent ) - *descent = (wxCoord)(d+0.5); + *descent = (wxCoord)wxRound(d); if ( x ) - *x = (wxCoord)(w+0.5); + *x = (wxCoord)wxRound(w); if ( y ) - *y = (wxCoord)(h+0.5); + *y = (wxCoord)wxRound(h); } /*