diff options
Diffstat (limited to 'lib/kofficecore/priorityqueue.h')
-rw-r--r-- | lib/kofficecore/priorityqueue.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/kofficecore/priorityqueue.h b/lib/kofficecore/priorityqueue.h index a9a5c770..b657ab73 100644 --- a/lib/kofficecore/priorityqueue.h +++ b/lib/kofficecore/priorityqueue.h @@ -86,7 +86,7 @@ namespace KOffice { private: // Note: We have to use a 1-based index here, and we get/return 0-based ones - int tqparent( int i ) { return ( ( i + 1 ) >> 1 ) - 1; } + int parent( int i ) { return ( ( i + 1 ) >> 1 ) - 1; } int left( int i ) { return ( ( i + 1 ) << 1 ) - 1; } int right( int i ) { return ( i + 1 ) << 1; } @@ -190,14 +190,14 @@ namespace KOffice { template<class T> void PriorityQueue<T>::bubbleUp( T* item, int i ) { - int p = tqparent( i ); + int p = parent( i ); while ( i > 0 && m_vector[ p ]->key() > item->key() ) { // update the index first m_vector[ p ]->setIndex( i ); // then move it there m_vector[ i ] = m_vector[ p ]; i = p; - p = tqparent( i ); + p = parent( i ); } item->setIndex( i ); m_vector[ i ] = item; |