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
-- 
_______________________________________________
Lazarus mailing list
[email protected]
https://lists.lazarus-ide.org/listinfo/lazarus

Reply via email to