mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 17:49:25 +02:00
+ small speedup of memoryimage.setsize
This commit is contained in:
parent
4f43c7e09f
commit
6b1e79316f
@ -488,7 +488,7 @@ begin
|
|||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
GetMem (NewData, r);
|
GetMem (NewData, r);
|
||||||
Fillchar (Newdata^[0], r, 0);
|
FillWord (Newdata^[0], r div sizeof(word), 0);
|
||||||
end;
|
end;
|
||||||
// MG: missing "and (NewData<>nil)"
|
// MG: missing "and (NewData<>nil)"
|
||||||
if (old <> 0) and assigned(FData) and (NewData<>nil) then
|
if (old <> 0) and assigned(FData) and (NewData<>nil) then
|
||||||
|
Loading…
Reference in New Issue
Block a user