Added operator[] convenience function to TQPtrList, similarly to TQValueList.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/1/head
Michele Calgaro 9 years ago
parent e418211d50
commit 6b220f98eb

@ -139,6 +139,7 @@ public:
uint containsRef( const type *d ) const
{ return TQGList::containsRef((TQPtrCollection::Item)d); }
bool replace( uint i, const type *d ) { return TQGList::replaceAt( i, (TQPtrCollection::Item)d ); }
type *operator[]( uint i ) { return (type *)TQGList::at(i); }
type *at( uint i ) { return (type *)TQGList::at(i); }
int at() const { return TQGList::at(); }
type *current() const { return (type *)TQGList::get(); }

@ -103,6 +103,7 @@ public:
uint containsRef( const type *d ) const
{ return TQGList::containsRef((TQPtrCollection::Item)d); }
bool replace( uint i, const type *d ) { return TQGList::replaceAt( i, (TQPtrCollection::Item)d ); }
type *operator[]( uint i ) { return (type *)TQGList::at(i); }
type *at( uint i ) { return (type *)TQGList::at(i); }
int at() const { return TQGList::at(); }
type *current() const { return (type *)TQGList::get(); }

Loading…
Cancel
Save