@@ -737,7 +737,7 @@ struct Decimal(uint maxSize64)
737
737
738
738
C[1 ] sign = coefficient.sign ? " -" : " +" ;
739
739
bool addSign = coefficient.sign || spec.plus;
740
- long s = this .exponent + coefficientLength;
740
+ auto s = cast ( sizediff_t ) this .exponent + coefficientLength;
741
741
742
742
alias zeros = zerosImpl! C;
743
743
@@ -796,7 +796,7 @@ struct Decimal(uint maxSize64)
796
796
{
797
797
buffer[$ - coefficientLength - 1 ] = sign[0 ];
798
798
w.put(buffer[$ - coefficientLength - addSign .. $]);
799
- w.put(zeros[$ - (this .exponent + 2 ) .. $]);
799
+ w.put(zeros[( $ - (cast ( sizediff_t ) this .exponent + 2 ) ) .. $]);
800
800
return ;
801
801
}
802
802
}
@@ -805,7 +805,7 @@ struct Decimal(uint maxSize64)
805
805
if (s <= 12 )
806
806
{
807
807
buffer0[$ - 16 .. $] = ' 0' ;
808
- putL(buffer0[$ - coefficientLength - 16 .. $ - 16 + this .exponent]);
808
+ putL(buffer0[$ - coefficientLength - 16 .. $ - 16 + cast ( sizediff_t ) this .exponent]);
809
809
w.put(zeros[$ - 2 .. $]);
810
810
return ;
811
811
}
@@ -991,7 +991,7 @@ struct Decimal(uint maxSize64)
991
991
import mir.utility: max;
992
992
BigInt! (max(rhsMaxSize64, maxSize64, 256u )) rhsCopy = void ;
993
993
BigIntView! (const size_t ) rhsView;
994
- auto expDiff = exponent - rhs.exponent;
994
+ auto expDiff = cast ( sizediff_t ) ( exponent - rhs.exponent) ;
995
995
if (expDiff >= 0 )
996
996
{
997
997
exponent = rhs.exponent;
0 commit comments