From c8f76dea8ea92d49123726cd8fb929cd9efdaf39 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 23 Oct 2021 20:24:52 +0100 Subject: [PATCH] Simplify wxBitmap::GetScaledXXX() in wxMSW The scale factor is always 1 in this port, so don't bother dividing or rounding by it. --- include/wx/msw/bitmap.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/include/wx/msw/bitmap.h b/include/wx/msw/bitmap.h index 4d661ff13c..260ec080de 100644 --- a/include/wx/msw/bitmap.h +++ b/include/wx/msw/bitmap.h @@ -187,10 +187,9 @@ public: // support for scaled bitmaps virtual double GetScaleFactor() const { return 1.0; } - virtual double GetScaledWidth() const { return GetWidth() / GetScaleFactor(); } - virtual double GetScaledHeight() const { return GetHeight() / GetScaleFactor(); } - virtual wxSize GetScaledSize() const - { return wxSize(wxRound(GetScaledWidth()), wxRound(GetScaledHeight())); } + virtual double GetScaledWidth() const { return GetWidth(); } + virtual double GetScaledHeight() const { return GetHeight(); } + virtual wxSize GetScaledSize() const { return GetSize(); } // implementation only from now on // -------------------------------