@@ -781,7 +781,7 @@ struct Decimal(uint maxSize64)
781
781
{
782
782
if (addSign)
783
783
w.put(sign[]);
784
- w.put(zeros[0 .. - s + 2 ]);
784
+ w.put(zeros[0 .. cast ( sizediff_t )( - s + 2 ) ]);
785
785
w.put(buffer[$ - coefficientLength .. $]);
786
786
return ;
787
787
}
@@ -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
}
@@ -822,16 +822,16 @@ struct Decimal(uint maxSize64)
822
822
buffer[$ - coefficientLength - 1 ] = sign[0 ];
823
823
w.put(buffer[$ - coefficientLength - addSign .. $ - coefficientLength + s]);
824
824
T2 :
825
- buffer[$ - coefficientLength + s - 1 ] = ' .' ;
826
- w.put(buffer[$ - coefficientLength + s - 1 .. $]);
825
+ buffer[$ - coefficientLength + cast ( sizediff_t ) s - 1 ] = ' .' ;
826
+ w.put(buffer[$ - coefficientLength + cast ( sizediff_t ) s - 1 .. $]);
827
827
return ;
828
828
}
829
829
}
830
830
else
831
831
{
832
832
if (s <= 12 || coefficientLength <= 12 )
833
833
{
834
- putL(buffer[$ - coefficientLength .. $ - coefficientLength + s]);
834
+ putL(buffer[$ - coefficientLength .. $ - coefficientLength + cast ( sizediff_t ) s]);
835
835
goto T2 ;
836
836
}
837
837
}
@@ -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