all repos — fluxbox @ 5ede399d4d1bb6e199b0d2c2820d45b3757a14f8

custom fork of the fluxbox windowmanager

Fix casting issues
Mathias Gumz akira@fluxbox.org
commit

5ede399d4d1bb6e199b0d2c2820d45b3757a14f8

parent

772ec145952bfddc7888504f22859df1f24f8d5e

1 files changed, 2 insertions(+), 2 deletions(-)

jump to
M src/FbTk/RelCalcHelper.ccsrc/FbTk/RelCalcHelper.cc

@@ -26,11 +26,11 @@

namespace RelCalcHelper { int calPercentageValueOf(int i, int j) { - return floor(i * j / 100 + 0.5); + return static_cast<int>(floor((static_cast<float>(i*j) / 100) + 0.5)); } int calPercentageOf(int i, int j) { - return floor((float) i / (float) j * 100 + 0.5); + return static_cast<int>(floor((float) i / (float) j * 100 + 0.5)); } }