mirror of
https://github.com/verilator/verilator.git
synced 2025-01-11 00:57:44 +00:00
Fix cast compile warning
This commit is contained in:
parent
301c878c0f
commit
d12a3dde45
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user