summaryrefslogtreecommitdiffstats
path: root/src/server/Load.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/Load.hpp')
-rw-r--r--src/server/Load.hpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/server/Load.hpp b/src/server/Load.hpp
index 2d806684..f69d0659 100644
--- a/src/server/Load.hpp
+++ b/src/server/Load.hpp
@@ -40,7 +40,9 @@ struct Load
mean = load;
changed = true;
} else {
- const float a = mean + ((float)load - mean) / (float)++n;
+ const float a = mean + (static_cast<float>(load) - mean) /
+ static_cast<float>(++n);
+
if (a != mean) {
changed = floorf(a) != floorf(mean);
mean = a;