aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathias Gumz <akira@fluxbox.org>2015-01-16 09:52:38 (GMT)
committerMathias Gumz <akira@fluxbox.org>2015-01-16 09:52:38 (GMT)
commit5ede399d4d1bb6e199b0d2c2820d45b3757a14f8 (patch)
tree092fe131002b298fffcc9b4b922553cee9b435b1
parent772ec145952bfddc7888504f22859df1f24f8d5e (diff)
downloadfluxbox-5ede399d4d1bb6e199b0d2c2820d45b3757a14f8.zip
fluxbox-5ede399d4d1bb6e199b0d2c2820d45b3757a14f8.tar.bz2
Fix casting issues
-rw-r--r--src/FbTk/RelCalcHelper.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/FbTk/RelCalcHelper.cc b/src/FbTk/RelCalcHelper.cc
index a537de4..9a018dc 100644
--- a/src/FbTk/RelCalcHelper.cc
+++ b/src/FbTk/RelCalcHelper.cc
@@ -26,11 +26,11 @@ namespace FbTk {
26 namespace RelCalcHelper { 26 namespace RelCalcHelper {
27 27
28 int calPercentageValueOf(int i, int j) { 28 int calPercentageValueOf(int i, int j) {
29 return floor(i * j / 100 + 0.5); 29 return static_cast<int>(floor((static_cast<float>(i*j) / 100) + 0.5));
30 } 30 }
31 31
32 int calPercentageOf(int i, int j) { 32 int calPercentageOf(int i, int j) {
33 return floor((float) i / (float) j * 100 + 0.5); 33 return static_cast<int>(floor((float) i / (float) j * 100 + 0.5));
34 } 34 }
35 35
36 } 36 }