mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 09:26:15 +02:00
* 2 Patches from Silvio Clecio
git-svn-id: trunk@32947 -
This commit is contained in:
parent
10e7570948
commit
4e7115a956
@ -305,7 +305,8 @@ type
|
|||||||
function Add(const AKey: TKey; const AData: TData): Integer; {$ifdef CLASSESINLINE} inline; {$endif}
|
function Add(const AKey: TKey; const AData: TData): Integer; {$ifdef CLASSESINLINE} inline; {$endif}
|
||||||
function Add(const AKey: TKey): Integer; {$ifdef CLASSESINLINE} inline; {$endif}
|
function Add(const AKey: TKey): Integer; {$ifdef CLASSESINLINE} inline; {$endif}
|
||||||
function Find(const AKey: TKey; out Index: Integer): Boolean; {$ifdef CLASSESINLINE} inline; {$endif}
|
function Find(const AKey: TKey; out Index: Integer): Boolean; {$ifdef CLASSESINLINE} inline; {$endif}
|
||||||
function TryGetValue(const AKey: TKey; out AData: TData): Boolean; {$ifdef CLASSESINLINE} inline; {$endif}
|
function TryGetData(const AKey: TKey; out AData: TData): Boolean; {$ifdef CLASSESINLINE} inline; {$endif}
|
||||||
|
procedure AddOrSetData(const AKey: TKey; const AData: TData); {$ifdef CLASSESINLINE} inline; {$endif}
|
||||||
function IndexOf(const AKey: TKey): Integer; {$ifdef CLASSESINLINE} inline; {$endif}
|
function IndexOf(const AKey: TKey): Integer; {$ifdef CLASSESINLINE} inline; {$endif}
|
||||||
function IndexOfData(const AData: TData): Integer;
|
function IndexOfData(const AData: TData): Integer;
|
||||||
procedure InsertKey(Index: Integer; const AKey: TKey);
|
procedure InsertKey(Index: Integer; const AKey: TKey);
|
||||||
@ -1482,7 +1483,7 @@ begin
|
|||||||
Result := inherited Find(@AKey, Index);
|
Result := inherited Find(@AKey, Index);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TFPGMap.TryGetValue(const AKey: TKey; out AData: TData): Boolean;
|
function TFPGMap.TryGetData(const AKey: TKey; out AData: TData): Boolean;
|
||||||
var
|
var
|
||||||
I: Integer;
|
I: Integer;
|
||||||
begin
|
begin
|
||||||
@ -1493,6 +1494,11 @@ begin
|
|||||||
AData := Default(TData);
|
AData := Default(TData);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TFPGMap.AddOrSetData(const AKey: TKey; const AData: TData);
|
||||||
|
begin
|
||||||
|
inherited PutKeyData(@AKey, @AData);
|
||||||
|
end;
|
||||||
|
|
||||||
function TFPGMap.IndexOf(const AKey: TKey): Integer;
|
function TFPGMap.IndexOf(const AKey: TKey): Integer;
|
||||||
begin
|
begin
|
||||||
Result := inherited IndexOf(@AKey);
|
Result := inherited IndexOf(@AKey);
|
||||||
|
Loading…
Reference in New Issue
Block a user