@@ -737,7 +737,7 @@ struct Decimal(uint maxSize64)
737737
738738 C[1 ] sign = coefficient.sign ? " -" : " +" ;
739739 bool addSign = coefficient.sign || spec.plus;
740- long s = this .exponent + coefficientLength;
740+ auto s = cast ( sizediff_t ) this .exponent + coefficientLength;
741741
742742 alias zeros = zerosImpl! C;
743743
@@ -796,7 +796,7 @@ struct Decimal(uint maxSize64)
796796 {
797797 buffer[$ - coefficientLength - 1 ] = sign[0 ];
798798 w.put(buffer[$ - coefficientLength - addSign .. $]);
799- w.put(zeros[$ - (this .exponent + 2 ) .. $]);
799+ w.put(zeros[( $ - (cast ( sizediff_t ) this .exponent + 2 ) ) .. $]);
800800 return ;
801801 }
802802 }
@@ -805,7 +805,7 @@ struct Decimal(uint maxSize64)
805805 if (s <= 12 )
806806 {
807807 buffer0[$ - 16 .. $] = ' 0' ;
808- putL(buffer0[$ - coefficientLength - 16 .. $ - 16 + this .exponent]);
808+ putL(buffer0[$ - coefficientLength - 16 .. $ - 16 + cast ( sizediff_t ) this .exponent]);
809809 w.put(zeros[$ - 2 .. $]);
810810 return ;
811811 }
@@ -991,7 +991,7 @@ struct Decimal(uint maxSize64)
991991 import mir.utility: max;
992992 BigInt! (max(rhsMaxSize64, maxSize64, 256u )) rhsCopy = void ;
993993 BigIntView! (const size_t ) rhsView;
994- auto expDiff = exponent - rhs.exponent;
994+ auto expDiff = cast ( sizediff_t ) ( exponent - rhs.exponent) ;
995995 if (expDiff >= 0 )
996996 {
997997 exponent = rhs.exponent;
0 commit comments