Changeset 25 for trunk/Packages/Common/UMemory.pas
- Timestamp:
- Sep 10, 2022, 6:54:43 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/Common/UMemory.pas
r15 r25 1 1 unit UMemory; 2 3 {$mode Delphi}{$H+}4 2 5 3 interface … … 44 42 end; 45 43 44 46 45 implementation 47 46 … … 50 49 procedure TPositionMemory.SetSize(AValue: Integer); 51 50 begin 52 inherited SetSize(AValue);51 inherited; 53 52 if FPosition > FSize then FPosition := FSize; 54 53 end; … … 107 106 begin 108 107 Size := 0; 109 inherited Destroy;108 inherited; 110 109 end; 111 110 112 111 procedure TMemory.WriteMemory(Position: Integer; Memory: TMemory); 113 112 begin 114 Move(Memory.FData, PByte( @FData+ Position)^, Memory.Size);113 Move(Memory.FData, PByte(PByte(@FData) + Position)^, Memory.Size); 115 114 end; 116 115 117 116 procedure TMemory.ReadMemory(Position: Integer; Memory: TMemory); 118 117 begin 119 Move(PByte( @FData+ Position)^, Memory.FData, Memory.Size);118 Move(PByte(PByte(@FData) + Position)^, Memory.FData, Memory.Size); 120 119 end; 121 120
Note:
See TracChangeset
for help on using the changeset viewer.