diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2015-09-14 19:08:42 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2015-09-14 19:08:42 +0900 |
commit | 6b220f98eb885722d8de9dd4813a30b90b12ee2d (patch) | |
tree | b3d321d6c71f4dde85d6afbde055329467a37ca4 | |
parent | e418211d50821c0f65ca2e65c542e8c0afe2c066 (diff) | |
download | tqt3-6b220f98eb885722d8de9dd4813a30b90b12ee2d.tar.gz tqt3-6b220f98eb885722d8de9dd4813a30b90b12ee2d.zip |
Added operator[] convenience function to TQPtrList, similarly to TQValueList.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
-rw-r--r-- | doc/html/qptrlist-h.html | 1 | ||||
-rw-r--r-- | src/tools/ntqptrlist.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/doc/html/qptrlist-h.html b/doc/html/qptrlist-h.html index 73e6f053c..3ed91173f 100644 --- a/doc/html/qptrlist-h.html +++ b/doc/html/qptrlist-h.html @@ -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(); } diff --git a/src/tools/ntqptrlist.h b/src/tools/ntqptrlist.h index 4482d0a9b..7418e5418 100644 --- a/src/tools/ntqptrlist.h +++ b/src/tools/ntqptrlist.h @@ -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(); } |