Simplify implementation of TStringList.InsertItem()
Original Reporter info from Mantis: Bart @flyingsheep
-
Reporter name: Bart Broersma
Original Reporter info from Mantis: Bart @flyingsheep
- Reporter name: Bart Broersma
Description:
The implementation of
TStringList.InsertItem(Index: Integer; const S: string);
and
TStringList.InsertItem(Index: Integer; const S: string; O: TObject);
are almost identical, with of course the exception of assigning Flist^[Index].Fobject
I propose to simplify InsertItem(Index,String) to calling InsertItem(Index,String,nil).
This would make code easy to maintain.
See attached patch.
Mantis conversion info:
- Mantis ID: 23860
- OS: Window
- OS Build: Win7
- Platform: i386
- Fixed in version: 2.6.4
- Fixed in revision: 25020 (#bb0980d7)