@@ -781,7 +781,7 @@ struct Decimal(uint maxSize64)
781781 {
782782 if (addSign)
783783 w.put(sign[]);
784- w.put(zeros[0 .. - s + 2 ]);
784+ w.put(zeros[0 .. cast ( sizediff_t )( - s + 2 ) ]);
785785 w.put(buffer[$ - coefficientLength .. $]);
786786 return ;
787787 }
@@ -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 }
@@ -822,16 +822,16 @@ struct Decimal(uint maxSize64)
822822 buffer[$ - coefficientLength - 1 ] = sign[0 ];
823823 w.put(buffer[$ - coefficientLength - addSign .. $ - coefficientLength + s]);
824824 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 .. $]);
827827 return ;
828828 }
829829 }
830830 else
831831 {
832832 if (s <= 12 || coefficientLength <= 12 )
833833 {
834- putL(buffer[$ - coefficientLength .. $ - coefficientLength + s]);
834+ putL(buffer[$ - coefficientLength .. $ - coefficientLength + cast ( sizediff_t ) s]);
835835 goto T2 ;
836836 }
837837 }
@@ -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