mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-23 20:59:36 +02:00
LCL: stringhashlist: disable range checking in hash function
git-svn-id: trunk@14255 -
This commit is contained in:
parent
8b91f41f9e
commit
9e72cfb939
@ -269,6 +269,8 @@ begin
|
||||
P:= PChar(Key);
|
||||
Len:= Length(Key);
|
||||
Result := Len;
|
||||
{$IFOPT R+}{$DEFINE RangeChecking}{$ENDIF}
|
||||
{$R-}
|
||||
// use the last 30 characters to compute the hash
|
||||
case fCaseSensitive of
|
||||
True:
|
||||
@ -278,6 +280,7 @@ begin
|
||||
for I := Len - 1 downto 0 do
|
||||
inc(Result, cardinal(ord(UpperCaseChars[P[I]])) shl I);
|
||||
end;
|
||||
{$IFDEF RangeChecking}{$R+}{$UNDEF RangeChecking}{$ENDIF}
|
||||
end;
|
||||
|
||||
procedure TStringHashList.Insert(Index: Integer; Item: PStringHashItem);
|
||||
|
Loading…
Reference in New Issue
Block a user