Fix cast compile warning

This commit is contained in:
Wilson Snyder 2011-07-28 07:59:30 -04:00
parent 301c878c0f
commit d12a3dde45

View File

@ -1494,12 +1494,12 @@ V3Number& V3Number::opIToRD (const V3Number& lhs) {
} }
V3Number& V3Number::opRToIS (const V3Number& lhs) { V3Number& V3Number::opRToIS (const V3Number& lhs) {
double v = trunc(lhs.toDouble()); double v = trunc(lhs.toDouble());
vlsint32_t i = v; // C converts from double to vlsint32 vlsint32_t i = (vlsint32_t)v; // C converts from double to vlsint32
return setLongS(i); return setLongS(i);
} }
V3Number& V3Number::opRToIRoundS (const V3Number& lhs) { V3Number& V3Number::opRToIRoundS (const V3Number& lhs) {
double v = round(lhs.toDouble()); double v = round(lhs.toDouble());
vlsint32_t i = v; // C converts from double to vlsint32 vlsint32_t i = (vlsint32_t)v; // C converts from double to vlsint32
return setLongS(i); return setLongS(i);
} }
V3Number& V3Number::opRealToBits (const V3Number& lhs) { V3Number& V3Number::opRealToBits (const V3Number& lhs) {