mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-19 18:59:10 +02:00
lazutils: less hints
git-svn-id: trunk@55679 -
This commit is contained in:
parent
dfb0f6e315
commit
895444b524
@ -436,7 +436,7 @@ begin
|
||||
exit(FHashCacheIndex);
|
||||
if not Assigned(FCustomHashFunction) then begin
|
||||
if not Assigned(FOwnerHashFunction) then begin
|
||||
Result:=Integer((PtrUInt(Key)+(PtrUint(Key) mod 17)) mod Cardinal(FCapacity));
|
||||
Result:=Integer(({%H-}PtrUInt(Key)+({%H-}PtrUint(Key) mod 17)) mod Cardinal(FCapacity));
|
||||
end else
|
||||
Result:=FOwnerHashFunction(Key);
|
||||
end else
|
||||
@ -501,9 +501,9 @@ end;
|
||||
function TDynHashArray.SlowAlternativeHashMethod(Sender: TDynHashArray;
|
||||
Item: Pointer): integer;
|
||||
begin
|
||||
Result:=integer((PtrUInt(Item) mod Cardinal(PrimeNumber))
|
||||
+(PtrUInt(Item) mod 17)+(PtrUInt(Item) mod 173)
|
||||
+(PtrUInt(Item) mod 521)
|
||||
Result:=integer(({%H-}PtrUInt(Item) mod Cardinal(PrimeNumber))
|
||||
+({%H-}PtrUInt(Item) mod 17)+({%H-}PtrUInt(Item) mod 173)
|
||||
+({%H-}PtrUInt(Item) mod 521)
|
||||
) mod FCapacity;
|
||||
end;
|
||||
|
||||
|
@ -456,7 +456,7 @@ begin
|
||||
end;
|
||||
if i=FLastIndex then
|
||||
dec(DataCount,FLastItemSpace);
|
||||
debugln([i,' Item=',HexStr(PtrUInt(FItems[i]),8),' Size=',fItems[i]^.Size,' Start=',DataOffset,' Count=',DataCount]);
|
||||
debugln([i,' Item=',HexStr({%H-}PtrUInt(FItems[i]),8),' Size=',fItems[i]^.Size,' Start=',DataOffset,' Count=',DataCount]);
|
||||
if WriteData then begin
|
||||
debugln(dbgMemRange(PByte(@FItems[i]^.Data)+DataOffset,DataCount));
|
||||
end;
|
||||
|
@ -44,7 +44,7 @@ type
|
||||
procedure DoResizeRecord(Index, OldSize, NewSize: integer);
|
||||
protected
|
||||
procedure ResizeRecord(var ARecord: Pointer;
|
||||
Index, OldSize, NewSize: integer); virtual;
|
||||
{%H-}Index, {%H-}OldSize, NewSize: integer); virtual;
|
||||
function GetObject(Index: Integer): TObject; override;
|
||||
procedure PutObject(Index: Integer; AnObject: TObject); override;
|
||||
public
|
||||
|
@ -105,7 +105,7 @@ type
|
||||
function InternalGetDataPtr(AItem: PMapItem): Pointer;
|
||||
function InternalGetId(AItem: PMapItem; out AID): Boolean;
|
||||
function InternalSetData(AItem: PMapItem; const AData): Boolean;
|
||||
procedure ReleaseData(ADataPtr: Pointer); virtual;
|
||||
procedure ReleaseData({%H-}ADataPtr: Pointer); virtual;
|
||||
public
|
||||
constructor Create(AIdType: TMapIdType; ADataSize: Cardinal);
|
||||
procedure Clear;
|
||||
@ -315,7 +315,7 @@ function TBaseMap.FindNode(const AId): TAvlTreeNode;
|
||||
var
|
||||
Item: TMapItem;
|
||||
begin
|
||||
Move(AID, Item.ID, ID_LENGTH[FIdType]);
|
||||
Move(AID, {%H-}Item.ID, ID_LENGTH[FIdType]);
|
||||
Result := FTree.Find(@Item);
|
||||
end;
|
||||
|
||||
@ -413,7 +413,7 @@ begin
|
||||
|
||||
p := @AItem^.ID;
|
||||
Inc(p, ID_LENGTH[FIdType]);
|
||||
Move(p^, AData, FDataSize);
|
||||
Move(p^, AData{%H-}, FDataSize);
|
||||
end;
|
||||
|
||||
function TBaseMap.InternalGetDataPtr(AItem: PMapItem): Pointer;
|
||||
@ -433,7 +433,7 @@ begin
|
||||
Result := AItem <> nil;
|
||||
if not Result then Exit;
|
||||
|
||||
Move(AItem^.ID, AID, ID_LENGTH[FIdType]);
|
||||
Move(AItem^.ID, AID{%H-}, ID_LENGTH[FIdType]);
|
||||
end;
|
||||
|
||||
function TBaseMap.InternalSetData(AItem: PMapItem; const AData): Boolean;
|
||||
@ -551,7 +551,7 @@ begin
|
||||
Node := FMap.FTree.Root;
|
||||
if Node <> nil
|
||||
then begin
|
||||
Move(AID, Item.ID, ID_LENGTH[FMap.FIdType]);
|
||||
Move(AID, {%H-}Item.ID, ID_LENGTH[FMap.FIdType]);
|
||||
LastNext := nil;
|
||||
while True do
|
||||
begin
|
||||
|
@ -2865,11 +2865,11 @@ end;
|
||||
if ( args^[0] and $100 <> 0 ) and
|
||||
( pEC^.metrics.pointSize <= A ) then pEC^.GS.scan_Control := True;
|
||||
|
||||
if ( args^[0] and $200 <> 0 ) and
|
||||
( false ) then pEC^.GS.scan_Control := True;
|
||||
//if ( args^[0] and $200 <> 0 ) and
|
||||
// ( false ) then pEC^.GS.scan_Control := True;
|
||||
|
||||
if ( args^[0] and $400 <> 0 ) and
|
||||
( false ) then pEC^.GS.scan_Control := True;
|
||||
//if ( args^[0] and $400 <> 0 ) and
|
||||
// ( false ) then pEC^.GS.scan_Control := True;
|
||||
|
||||
if ( args^[0] and $800 <> 0 ) and
|
||||
( pEC^.metrics.pointSize > A ) then pEC^.GS.scan_Control := False;
|
||||
|
Loading…
Reference in New Issue
Block a user