Change wxSize::Scale() to take double, not float
There doesn't seem to be any reason to use float here when double is used everywhere else. Moreover, the (implicit) conversion of int to float is not always lossless, and resulted in -Wconversion warnings from g++ 7, which disappear when using doubles.
This commit is contained in:
@@ -318,7 +318,7 @@ public:
|
||||
void DecBy(int d) { DecBy(d, d); }
|
||||
|
||||
|
||||
wxSize& Scale(float xscale, float yscale)
|
||||
wxSize& Scale(double xscale, double yscale)
|
||||
{ x = (int)(x*xscale); y = (int)(y*yscale); return *this; }
|
||||
|
||||
// accessors
|
||||
|
Reference in New Issue
Block a user