summaryrefslogtreecommitdiffstats
path: root/experimental/tqtinterface/qt4/src/tools/tqmap.h
diff options
context:
space:
mode:
Diffstat (limited to 'experimental/tqtinterface/qt4/src/tools/tqmap.h')
-rw-r--r--experimental/tqtinterface/qt4/src/tools/tqmap.h36
1 files changed, 13 insertions, 23 deletions
diff --git a/experimental/tqtinterface/qt4/src/tools/tqmap.h b/experimental/tqtinterface/qt4/src/tools/tqmap.h
index fe36e9701..006f49037 100644
--- a/experimental/tqtinterface/qt4/src/tools/tqmap.h
+++ b/experimental/tqtinterface/qt4/src/tools/tqmap.h
@@ -392,7 +392,6 @@ public:
ConstIterator end() const { return ConstIterator( header ); }
ConstIterator find(const Key& k) const;
- ConstIterator tqfind(const Key& k) const;
void remove( Iterator it ) {
NodePtr del = (NodePtr) removeAndRebalance( it.node, header->tqparent, header->left, header->right );
@@ -508,12 +507,6 @@ TQ_INLINE_TEMPLATES void TQMapPrivate<Key,T>::clear( TQ_TYPENAME TQMapPrivate<Ke
template <class Key, class T>
TQ_INLINE_TEMPLATES TQ_TYPENAME TQMapPrivate<Key,T>::ConstIterator TQMapPrivate<Key,T>::find(const Key& k) const
{
- return tqfind(k);
-}
-
-template <class Key, class T>
-TQ_INLINE_TEMPLATES TQ_TYPENAME TQMapPrivate<Key,T>::ConstIterator TQMapPrivate<Key,T>::tqfind(const Key& k) const
-{
TQMapNodeBase* y = header; // Last node
TQMapNodeBase* x = header->tqparent; // Root node.
@@ -560,7 +553,7 @@ TQ_INLINE_TEMPLATES TQ_TYPENAME TQMapPrivate<Key,T>::Iterator TQMapPrivate<Key,T
// Really bigger ?
if ( (j.node->key) < k )
return insert(x, y, k );
- // We are going to tqreplace a node
+ // We are going to replace a node
return j;
}
@@ -709,7 +702,7 @@ public:
const_iterator constBegin() const { return begin(); }
const_iterator constEnd() const { return end(); }
- iterator tqreplace( const Key& k, const T& v )
+ iterator replace( const Key& k, const T& v )
{
remove( k );
return insert( k, v );
@@ -735,21 +728,18 @@ public:
T& operator[] ( const Key& k );
void clear();
- iterator tqfind ( const Key& k )
+ iterator find ( const Key& k )
{
detach();
- return iterator( sh->tqfind( k ).node );
+ return iterator( sh->find( k ).node );
}
- const_iterator tqfind ( const Key& k ) const { return sh->tqfind( k ); }
-
- iterator find ( const Key& k ) { return tqfind(k); }
- const_iterator find ( const Key& k ) const { return tqfind(k); }
+ const_iterator find ( const Key& k ) const { return sh->find( k ); }
const T& operator[] ( const Key& k ) const
- { TQT_CHECK_INVALID_MAP_ELEMENT; return sh->tqfind( k ).data(); }
- bool tqcontains ( const Key& k ) const
- { return tqfind( k ) != end(); }
- //{ return sh->tqfind( k ) != ((const Priv*)sh)->end(); }
+ { TQT_CHECK_INVALID_MAP_ELEMENT; return sh->find( k ).data(); }
+ bool contains ( const Key& k ) const
+ { return find( k ) != end(); }
+ //{ return sh->find( k ) != ((const Priv*)sh)->end(); }
size_type count() const { return sh->node_count; }
@@ -847,7 +837,7 @@ template<class Key, class T>
TQ_INLINE_TEMPLATES void TQMap<Key,T>::erase( const Key& k )
{
detach();
- iterator it( sh->tqfind( k ).node );
+ iterator it( sh->find( k ).node );
if ( it != end() )
sh->remove( it );
}
@@ -855,7 +845,7 @@ TQ_INLINE_TEMPLATES void TQMap<Key,T>::erase( const Key& k )
template<class Key, class T>
TQ_INLINE_TEMPLATES TQ_TYPENAME TQMap<Key,T>::size_type TQMap<Key,T>::count( const Key& k ) const
{
- const_iterator it( sh->tqfind( k ).node );
+ const_iterator it( sh->find( k ).node );
if ( it != end() ) {
size_type c = 0;
while ( it != end() ) {
@@ -871,7 +861,7 @@ template<class Key, class T>
TQ_INLINE_TEMPLATES T& TQMap<Key,T>::operator[] ( const Key& k )
{
detach();
- TQMapNode<Key,T>* p = sh->tqfind( k ).node;
+ TQMapNode<Key,T>* p = sh->find( k ).node;
if ( p != sh->end().node )
return p->data;
return insert( k, T() ).data();
@@ -903,7 +893,7 @@ template<class Key, class T>
TQ_INLINE_TEMPLATES void TQMap<Key,T>::remove( const Key& k )
{
detach();
- iterator it( sh->tqfind( k ).node );
+ iterator it( sh->find( k ).node );
if ( it != end() )
sh->remove( it );
}