Everywhere: Don't promote float to double where not needed

The `float => double => float` round trip seen in a couple of places
might pessimize the code. Even if it's truncated to an int in the end,
it's weird not to use the functions with the `f` suffixes when working
with single precision floats.
This commit is contained in:
Daniel Bertalan 2021-07-05 18:56:06 +02:00 committed by Gunnar Beutner
parent 01a0aa6e0b
commit f14a4994b0
Notes: sideshowbarker 2024-07-18 10:06:16 +09:00
6 changed files with 16 additions and 16 deletions

View file

@ -94,7 +94,7 @@ private:
if (value >= 0) {
painter.draw_line(
{ rect.x() + i, rect.bottom() },
{ rect.x() + i, rect.top() + (int)(round(rect.height() - (value * rect.height()))) },
{ rect.x() + i, rect.top() + (int)(roundf(rect.height() - (value * rect.height()))) },
m_graph_color);
} else {
painter.draw_line(