Skip to content

Commit

Permalink
updated cycle scanner to use Integer rather than LongInt which should…
Browse files Browse the repository at this point in the history
… have the same width on all platforms (according to docs)
  • Loading branch information
shadow-cs committed Feb 14, 2017
1 parent 6e50af2 commit 0c68a8d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Source/LeakCheck.Cycle.pas
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ TScanner = class
class procedure PeekData(var P: PByte; var Data; Len: Integer); inline;
class procedure ReadData(var P: PByte; var Data; Len: Integer); inline;
class function ReadI16(var P: PByte): Smallint; inline;
class function ReadI32(var P: PByte): Longint; inline;
class function ReadI32(var P: PByte): Integer; inline;
class function ReadI8(var P: PByte): Shortint; inline;
class function ReadPointer(var P: PByte): Pointer; inline;
class function ReadU16(var P: PByte): Word; inline;
Expand Down Expand Up @@ -324,7 +324,7 @@ class function TScanner.ReadI16(var P: PByte): Smallint;
ReadData(P, Result, SizeOf(Result));
end;

class function TScanner.ReadI32(var P: PByte): Longint;
class function TScanner.ReadI32(var P: PByte): Integer;
begin
ReadData(P, Result, SizeOf(Result));
end;
Expand Down Expand Up @@ -475,7 +475,7 @@ procedure TScanner.ScanClassInternal(const Instance: TObject);
ClassTab: PVmtFieldClassTab;
I: Integer;
Total, Found: Integer;
Count: LongInt;
Count: Integer;
LastFieldOffset: Integer;
Classic: TArray<Cardinal>;
Comparer: IComparer<Cardinal>;
Expand Down Expand Up @@ -654,7 +654,7 @@ procedure TScanner.ScanRecord(P: Pointer; TypeInfo: PTypeInfo;
function ScanExtended(Inst: Pointer; TypeInfo: PTypeInfo): Boolean;
var
TypeData: PTypeData;
Count: LongInt;
Count: Integer;
P: PByte;
I: Integer;
begin
Expand Down

0 comments on commit 0c68a8d

Please sign in to comment.