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:
parent
1540361e75
commit
9774d92e91
2 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue