From 5ede399d4d1bb6e199b0d2c2820d45b3757a14f8 Mon Sep 17 00:00:00 2001 From: Mathias Gumz Date: Fri, 16 Jan 2015 10:52:38 +0100 Subject: Fix casting issues --- src/FbTk/RelCalcHelper.cc | 4 ++-- 1 file 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 { namespace RelCalcHelper { int calPercentageValueOf(int i, int j) { - return floor(i * j / 100 + 0.5); + return static_cast(floor((static_cast(i*j) / 100) + 0.5)); } int calPercentageOf(int i, int j) { - return floor((float) i / (float) j * 100 + 0.5); + return static_cast(floor((float) i / (float) j * 100 + 0.5)); } } -- cgit v0.11.2