From: nds Date: Wed, 20 May 2015 05:30:57 +0000 (+0300) Subject: Avoid compilation warnings. X-Git-Tag: V_1.2.0~140^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8f050e3949b2df3304871090e43f32744559b87e;p=modules%2Fshaper.git Avoid compilation warnings. --- diff --git a/src/ModelAPI/ModelAPI_Tools.cpp b/src/ModelAPI/ModelAPI_Tools.cpp index 581471df3..1073922ee 100644 --- a/src/ModelAPI/ModelAPI_Tools.cpp +++ b/src/ModelAPI/ModelAPI_Tools.cpp @@ -99,18 +99,18 @@ std::vector HSVtoRGB(int theH, int theS, int theV) double aVdec = theV - anA; double aPercentToValue = 255./100; - aV *= aPercentToValue; - aVinc *= aPercentToValue; - aVmin *= aPercentToValue; - aVdec *= aPercentToValue; + int aV_int = (int)(aV*aPercentToValue); + int aVinc_int = (int)(aVinc*aPercentToValue); + int aVmin_int = (int)(aVmin*aPercentToValue); + int aVdec_int = (int)(aVdec*aPercentToValue); switch(aHi) { - case 0: appendValues(aRGB, aV, aVinc, aVmin); break; - case 1: appendValues(aRGB, aVdec, aV, aVmin); break; - case 2: appendValues(aRGB, aVmin, aV, aVinc); break; - case 3: appendValues(aRGB, aVmin, aVdec, aV); break; - case 4: appendValues(aRGB, aVinc, aVmin, aV); break; - case 5: appendValues(aRGB, aV, aVmin, aVdec); break; + case 0: appendValues(aRGB, aV_int, aVinc_int, aVmin_int); break; + case 1: appendValues(aRGB, aVdec_int, aV_int, aVmin_int); break; + case 2: appendValues(aRGB, aVmin_int, aV_int, aVinc_int); break; + case 3: appendValues(aRGB, aVmin_int, aVdec_int, aV_int); break; + case 4: appendValues(aRGB, aVinc_int, aVmin_int, aV_int); break; + case 5: appendValues(aRGB, aV_int, aVmin_int, aVdec_int); break; default: break; } return aRGB;