aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Classes/UCommon.pas
diff options
context:
space:
mode:
Diffstat (limited to 'Game/Code/Classes/UCommon.pas')
-rw-r--r--Game/Code/Classes/UCommon.pas4
1 files changed, 4 insertions, 0 deletions
diff --git a/Game/Code/Classes/UCommon.pas b/Game/Code/Classes/UCommon.pas
index 7eefedac..89b5623f 100644
--- a/Game/Code/Classes/UCommon.pas
+++ b/Game/Code/Classes/UCommon.pas
@@ -736,6 +736,7 @@ type
* supports an alignment "x" of up to 8 bytes only whereas FPC supports
* alignments on 16 and 32 byte boundaries too.
*)
+{$WARNINGS OFF}
function GetAlignedMem(Size: cardinal; Alignment: integer): Pointer;
var
OrigPtr: Pointer;
@@ -766,12 +767,15 @@ begin
// set header with info on old pointer for FreeMem
PMemAlignHeader(PtrUInt(Result) - SizeOf(TMemAlignHeader))^ := OrigPtr;
end;
+{$WARNINGS ON}
+{$WARNINGS OFF}
procedure FreeAlignedMem(P: Pointer);
begin
if (P <> nil) then
FreeMem(PMemAlignHeader(PtrUInt(P) - SizeOf(TMemAlignHeader))^);
end;
+{$WARNINGS ON}
initialization