Browse Source

- fix minor compiler warnings.

Ugochukwu Mmaduekwe 7 years ago
parent
commit
f9ca11d848

+ 5 - 2
QRCodeGenLib/src/QRCodeGen/QlpQrCode.pas

@@ -628,10 +628,13 @@ begin
 end;
 
 class function TQrCode.GetNumDataCodeWords(AVersion: Int32; AEcl: TEcc): Int32;
+var
+  LEclInt: Int32;
 begin
+  LEclInt := AEcl.ToInt32;
   Result := (TBits.Asr32(TQrTemplate.GetNumRawDataModules(AVersion), 3)) -
-    (ECC_CODEWORDS_PER_BLOCK[AEcl.ToInt32][AVersion] *
-    NUM_ERROR_CORRECTION_BLOCKS[AEcl.ToInt32][AVersion]);
+    (ECC_CODEWORDS_PER_BLOCK[LEclInt][AVersion] * NUM_ERROR_CORRECTION_BLOCKS
+    [LEclInt][AVersion]);
 end;
 
 function TQrCode.GetPenaltyScore: Int32;

+ 1 - 1
QRCodeGenLib/src/QRCodeGen/QlpQrSegment.pas

@@ -422,7 +422,7 @@ begin
   for LIdx := System.Low(AData) to System.High(AData) do
   begin
     LBits[TBits.Asr32(LIdx, 2)] := LBits[TBits.Asr32(LIdx, 2)] or
-      ((AData[LIdx] and $FF) shl ((not LIdx) shl 3));
+      Int64((AData[LIdx] and $FF) shl ((not LIdx) shl 3));
   end;
   result := TQrSegment.Create(TQrSegmentMode.qsmByte, System.Length(AData),
     LBits, System.Length(AData) * 8);