Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2017-11

IntegerList

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Juha Manninen

I finally added a unit IntegerList and class TIntegerList into LazUtils package. It has a simple implementation using generics.
TIntegerList = class(specialize TFPGList<Integer>)

I already replaced some TList hacks for integers which required ugly typecasts like
Integer(PtrUInt(...))
and
Pointer(PtrInt(...))
Does anybody know of other such hacks in Lazarus sources?

Obviously the class can be freely used in any user code, too. I guess an IntegerList is implemented in many places independently. It is such a common use case.

Juha

Reply by email