diff options
Diffstat (limited to 'src/tools/tqmap.h')
| -rw-r--r-- | src/tools/tqmap.h | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/src/tools/tqmap.h b/src/tools/tqmap.h index 8689e17ee..5f594c068 100644 --- a/src/tools/tqmap.h +++ b/src/tools/tqmap.h @@ -167,7 +167,7 @@ public: }; template <class K, class T> -TQ_INLINE_TEMPLATES int TQMapIterator<K,T>::inc() +int TQMapIterator<K,T>::inc() { TQMapNodeBase* tmp = node; if ( tmp->right ) { @@ -188,7 +188,7 @@ TQ_INLINE_TEMPLATES int TQMapIterator<K,T>::inc() } template <class K, class T> -TQ_INLINE_TEMPLATES int TQMapIterator<K,T>::dec() +int TQMapIterator<K,T>::dec() { TQMapNodeBase* tmp = node; if (tmp->color == TQMapNodeBase::Red && @@ -283,7 +283,7 @@ public: }; template <class K, class T> -TQ_INLINE_TEMPLATES int TQMapConstIterator<K,T>::inc() +int TQMapConstIterator<K,T>::inc() { TQMapNodeBase* tmp = node; if ( tmp->right ) { @@ -304,7 +304,7 @@ TQ_INLINE_TEMPLATES int TQMapConstIterator<K,T>::inc() } template <class K, class T> -TQ_INLINE_TEMPLATES int TQMapConstIterator<K,T>::dec() +int TQMapConstIterator<K,T>::dec() { TQMapNodeBase* tmp = node; if (tmp->color == TQMapNodeBase::Red && @@ -432,14 +432,14 @@ protected: template <class Key, class T> -TQ_INLINE_TEMPLATES TQMapPrivate<Key,T>::TQMapPrivate() { +TQMapPrivate<Key,T>::TQMapPrivate() { header = new Node; header->color = TQMapNodeBase::Red; // Mark the header header->parent = 0; header->left = header->right = header; } template <class Key, class T> -TQ_INLINE_TEMPLATES TQMapPrivate<Key,T>::TQMapPrivate( const TQMapPrivate< Key, T >* _map ) : TQMapPrivateBase( _map ) { +TQMapPrivate<Key,T>::TQMapPrivate( const TQMapPrivate< Key, T >* _map ) : TQMapPrivateBase( _map ) { header = new Node; header->color = TQMapNodeBase::Red; // Mark the header if ( _map->header->parent == 0 ) { @@ -454,7 +454,7 @@ TQ_INLINE_TEMPLATES TQMapPrivate<Key,T>::TQMapPrivate( const TQMapPrivate< Key, } template <class Key, class T> -TQ_INLINE_TEMPLATES TQ_TYPENAME TQMapPrivate<Key,T>::NodePtr TQMapPrivate<Key,T>::copy( TQ_TYPENAME TQMapPrivate<Key,T>::NodePtr p ) +TQ_TYPENAME TQMapPrivate<Key,T>::NodePtr TQMapPrivate<Key,T>::copy( TQ_TYPENAME TQMapPrivate<Key,T>::NodePtr p ) { if ( !p ) return 0; @@ -476,7 +476,7 @@ TQ_INLINE_TEMPLATES TQ_TYPENAME TQMapPrivate<Key,T>::NodePtr TQMapPrivate<Key,T> } template <class Key, class T> -TQ_INLINE_TEMPLATES void TQMapPrivate<Key,T>::clear() +void TQMapPrivate<Key,T>::clear() { clear( (NodePtr)(header->parent) ); header->color = TQMapNodeBase::Red; @@ -486,7 +486,7 @@ TQ_INLINE_TEMPLATES void TQMapPrivate<Key,T>::clear() } template <class Key, class T> -TQ_INLINE_TEMPLATES void TQMapPrivate<Key,T>::clear( TQ_TYPENAME TQMapPrivate<Key,T>::NodePtr p ) +void TQMapPrivate<Key,T>::clear( TQ_TYPENAME TQMapPrivate<Key,T>::NodePtr p ) { while ( p != 0 ) { clear( (NodePtr)p->right ); @@ -497,7 +497,7 @@ 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 +TQ_TYPENAME TQMapPrivate<Key,T>::ConstIterator TQMapPrivate<Key,T>::find(const Key& k) const { TQMapNodeBase* y = header; // Last node TQMapNodeBase* x = header->parent; // Root node. @@ -520,7 +520,7 @@ TQ_INLINE_TEMPLATES TQ_TYPENAME TQMapPrivate<Key,T>::ConstIterator TQMapPrivate< } template <class Key, class T> -TQ_INLINE_TEMPLATES TQ_TYPENAME TQMapPrivate<Key,T>::Iterator TQMapPrivate<Key,T>::insertSingle( const Key& k ) +TQ_TYPENAME TQMapPrivate<Key,T>::Iterator TQMapPrivate<Key,T>::insertSingle( const Key& k ) { // Search correct position in the tree TQMapNodeBase* y = header; @@ -551,7 +551,7 @@ TQ_INLINE_TEMPLATES TQ_TYPENAME TQMapPrivate<Key,T>::Iterator TQMapPrivate<Key,T template <class Key, class T> -TQ_INLINE_TEMPLATES TQ_TYPENAME TQMapPrivate<Key,T>::Iterator TQMapPrivate<Key,T>::insert( TQMapNodeBase* x, TQMapNodeBase* y, const Key& k ) +TQ_TYPENAME TQMapPrivate<Key,T>::Iterator TQMapPrivate<Key,T>::insert( TQMapNodeBase* x, TQMapNodeBase* y, const Key& k ) { NodePtr z = new Node( k ); if (y == header || x != 0 || k < key(y) ) { @@ -754,7 +754,7 @@ private: }; template<class Key, class T> -TQ_INLINE_TEMPLATES TQMap<Key,T>& TQMap<Key,T>::operator= ( const TQMap<Key,T>& m ) +TQMap<Key,T>& TQMap<Key,T>::operator= ( const TQMap<Key,T>& m ) { m.sh->ref(); if ( sh->deref() ) @@ -764,7 +764,7 @@ TQ_INLINE_TEMPLATES TQMap<Key,T>& TQMap<Key,T>::operator= ( const TQMap<Key,T>& } template<class Key, class T> -TQ_INLINE_TEMPLATES TQ_TYPENAME TQMap<Key,T>::insert_pair TQMap<Key,T>::insert( const TQ_TYPENAME TQMap<Key,T>::value_type& x ) +TQ_TYPENAME TQMap<Key,T>::insert_pair TQMap<Key,T>::insert( const TQ_TYPENAME TQMap<Key,T>::value_type& x ) { detach(); size_type n = size(); @@ -778,7 +778,7 @@ TQ_INLINE_TEMPLATES TQ_TYPENAME TQMap<Key,T>::insert_pair TQMap<Key,T>::insert( } template<class Key, class T> -TQ_INLINE_TEMPLATES void TQMap<Key,T>::erase( const Key& k ) +void TQMap<Key,T>::erase( const Key& k ) { detach(); iterator it( sh->find( k ).node ); @@ -787,7 +787,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 +TQ_TYPENAME TQMap<Key,T>::size_type TQMap<Key,T>::count( const Key& k ) const { const_iterator it( sh->find( k ).node ); if ( it != end() ) { @@ -802,7 +802,7 @@ TQ_INLINE_TEMPLATES TQ_TYPENAME TQMap<Key,T>::size_type TQMap<Key,T>::count( con } template<class Key, class T> -TQ_INLINE_TEMPLATES T& TQMap<Key,T>::operator[] ( const Key& k ) +T& TQMap<Key,T>::operator[] ( const Key& k ) { detach(); TQMapNode<Key,T>* p = sh->find( k ).node; @@ -812,7 +812,7 @@ TQ_INLINE_TEMPLATES T& TQMap<Key,T>::operator[] ( const Key& k ) } template<class Key, class T> -TQ_INLINE_TEMPLATES void TQMap<Key,T>::clear() +void TQMap<Key,T>::clear() { if ( sh->count == 1 ) sh->clear(); @@ -823,7 +823,7 @@ TQ_INLINE_TEMPLATES void TQMap<Key,T>::clear() } template<class Key, class T> -TQ_INLINE_TEMPLATES TQ_TYPENAME TQMap<Key,T>::iterator TQMap<Key,T>::insert( const Key& key, const T& value, bool overwrite ) +TQ_TYPENAME TQMap<Key,T>::iterator TQMap<Key,T>::insert( const Key& key, const T& value, bool overwrite ) { detach(); size_type n = size(); @@ -834,7 +834,7 @@ TQ_INLINE_TEMPLATES TQ_TYPENAME TQMap<Key,T>::iterator TQMap<Key,T>::insert( con } template<class Key, class T> -TQ_INLINE_TEMPLATES void TQMap<Key,T>::remove( const Key& k ) +void TQMap<Key,T>::remove( const Key& k ) { detach(); iterator it( sh->find( k ).node ); @@ -843,7 +843,7 @@ TQ_INLINE_TEMPLATES void TQMap<Key,T>::remove( const Key& k ) } template<class Key, class T> -TQ_INLINE_TEMPLATES void TQMap<Key,T>::detachInternal() +void TQMap<Key,T>::detachInternal() { sh->deref(); sh = new TQMapPrivate<Key,T>( sh ); } @@ -851,7 +851,7 @@ TQ_INLINE_TEMPLATES void TQMap<Key,T>::detachInternal() #ifndef TQT_NO_DATASTREAM template<class Key, class T> -TQ_INLINE_TEMPLATES TQDataStream& operator>>( TQDataStream& s, TQMap<Key,T>& m ) { +TQDataStream& operator>>( TQDataStream& s, TQMap<Key,T>& m ) { m.clear(); TQ_UINT32 c; s >> c; @@ -867,7 +867,7 @@ TQ_INLINE_TEMPLATES TQDataStream& operator>>( TQDataStream& s, TQMap<Key,T>& m ) template<class Key, class T> -TQ_INLINE_TEMPLATES TQDataStream& operator<<( TQDataStream& s, const TQMap<Key,T>& m ) { +TQDataStream& operator<<( TQDataStream& s, const TQMap<Key,T>& m ) { s << (TQ_UINT32)m.size(); TQMapConstIterator<Key,T> it = m.begin(); for( ; it != m.end(); ++it ) |
