From accd43d76e2bc21f9b2ef1435fac700e6ec1785b Mon Sep 17 00:00:00 2001 From: Dimitri Schoolwerth Date: Sun, 8 Aug 2021 21:27:26 +0200 Subject: [PATCH] Remove unnecessary calls to wxRound from wxImage code No real changes: In wxImage::Rotate() don't needlessly wxRound numbers that are already whole after having called ceil/floor. Occurred since inception in 7a632f1056 (Added rotation to wxImage, 2000-02-06). See https://github.com/wxWidgets/wxWidgets/pull/2460 --- src/common/image.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/common/image.cpp b/src/common/image.cpp index 340b3942a0..e4fe44769e 100644 --- a/src/common/image.cpp +++ b/src/common/image.cpp @@ -3744,8 +3744,8 @@ wxImage wxImage::Rotate(double angle, if (0 < src.x && src.x < w - 1) { - x1 = wxRound(floor(src.x)); - x2 = wxRound(ceil(src.x)); + x1 = (int) floor(src.x); + x2 = (int) ceil(src.x); } else // else means that x is near one of the borders (0 or width-1) { @@ -3754,8 +3754,8 @@ wxImage wxImage::Rotate(double angle, if (0 < src.y && src.y < h - 1) { - y1 = wxRound(floor(src.y)); - y2 = wxRound(ceil(src.y)); + y1 = (int) floor(src.y); + y2 = (int) ceil(src.y); } else {