mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-19 19:09:28 +01:00
LazUtils: Remove useless code in TDictionaryStringList.Assign. The test "if Source is TStrings" is done in inherited method.
git-svn-id: trunk@40556 -
This commit is contained in:
parent
41d9e5262e
commit
c0878f5175
@ -79,13 +79,9 @@ end;
|
||||
|
||||
procedure TDictionaryStringList.Assign(Source: TPersistent);
|
||||
begin
|
||||
if Source is TStrings then
|
||||
begin
|
||||
// This crashes when the Source is a normal TStringList. Why?
|
||||
inherited Assign(Source);
|
||||
if Source is TDictionaryStringList then
|
||||
FMap.Assign(TDictionaryStringList(Source).FMap);
|
||||
end;
|
||||
inherited Assign(Source);
|
||||
if Source is TDictionaryStringList then
|
||||
FMap.Assign(TDictionaryStringList(Source).FMap);
|
||||
end;
|
||||
|
||||
procedure TDictionaryStringList.Clear;
|
||||
@ -137,7 +133,6 @@ end;
|
||||
procedure TDictionaryStringList.InsertItem(Index: Integer; const S: string; O: TObject);
|
||||
begin
|
||||
raise Exception.Create('TDictionaryStringList.InsertItem: is this needed?');
|
||||
//inherited InsertItem(Index, S, O);
|
||||
end;
|
||||
|
||||
function TDictionaryStringList.Contains(const S: string): Boolean;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user