mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 07:06:08 +02:00
* Use Align function to align fields in record-buffer
git-svn-id: trunk@11164 -
This commit is contained in:
parent
9fb37eb246
commit
f92e594e56
@ -1808,8 +1808,7 @@ var x : longint;
|
|||||||
begin
|
begin
|
||||||
FNullmaskSize := 1+((FieldDefs.count-1) div 8);
|
FNullmaskSize := 1+((FieldDefs.count-1) div 8);
|
||||||
{$IFDEF FPC_REQUIRES_PROPER_ALIGNMENT}
|
{$IFDEF FPC_REQUIRES_PROPER_ALIGNMENT}
|
||||||
if (FNullmaskSize and 3 <> 0) then
|
FNullmaskSize:=Align(FNullmaskSize,4);
|
||||||
FNullmaskSize := (FNullmaskSize and not 3)+4;
|
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
FRecordSize := FNullmaskSize;
|
FRecordSize := FNullmaskSize;
|
||||||
SetLength(FFieldBufPositions,FieldDefs.count);
|
SetLength(FFieldBufPositions,FieldDefs.count);
|
||||||
@ -1818,8 +1817,7 @@ begin
|
|||||||
FFieldBufPositions[x] := FRecordSize;
|
FFieldBufPositions[x] := FRecordSize;
|
||||||
inc(FRecordSize, GetFieldSize(FieldDefs[x]));
|
inc(FRecordSize, GetFieldSize(FieldDefs[x]));
|
||||||
{$IFDEF FPC_REQUIRES_PROPER_ALIGNMENT}
|
{$IFDEF FPC_REQUIRES_PROPER_ALIGNMENT}
|
||||||
if (FRecordSize and 3 <> 0) then
|
FRecordSize:=Align(FRecordSize,4);
|
||||||
FRecordSize := (FRecordSize and not 3)+4;
|
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user