Make FGL lists First and Last properties that are settable
Original Reporter info from Mantis: Michalis @michaliskambi
-
Reporter name: Michalis Kamburelis
Original Reporter info from Mantis: Michalis @michaliskambi
- Reporter name: Michalis Kamburelis
Description:
Like the title says. This seems a natural extension of current First/Last functions. Sometimes it allows to write shorter, cleaner code (I use such settable First/Last properties in some of my containers).
Patch vs SVN trunk attached. Simple test attached.
Note that SetFirst/SetLast use Put(), which should already do the necessary bookkeeping: check index (this already works Ok) and call Deref (this should be fixed with #19854 (closed)). After fixing #19854 (closed), the attached testcase should not make any memory leaks (right now, tests with TIntObjectList will make leaks).
Mantis conversion info:
- Mantis ID: 19874
- OS: Debian GNU/Linux
- OS Build: (testing)
- Platform: i386
- Fixed in version: 2.6.0
- Fixed in revision: 19018 (#a640bd0e)