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:
juha 2013-03-15 16:27:26 +00:00
parent 41d9e5262e
commit c0878f5175

View File

@ -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;