diff options
author | Anton Ageev <antage@gmail.com> | 2013-01-12 12:59:34 +0400 |
---|---|---|
committer | Adrian Thurston <thurston@complang.org> | 2013-01-20 09:46:35 -0500 |
commit | 48712d213c4120a22e58ad6bba0e81ae8edba1e0 (patch) | |
tree | cb4f9fa68f002ed0b720897916e99c3f4247349e | |
parent | 4d8adebebd462faf25c5e674b9954af7d22be241 (diff) | |
download | colm-48712d213c4120a22e58ad6bba0e81ae8edba1e0.tar.gz |
Add gcc 4.7 support
-rw-r--r-- | aapl/avlcommon.h | 12 | ||||
-rw-r--r-- | aapl/bstcommon.h | 14 | ||||
-rw-r--r-- | aapl/bubblesort.h | 2 | ||||
-rw-r--r-- | aapl/mergesort.h | 2 |
4 files changed, 15 insertions, 15 deletions
diff --git a/aapl/avlcommon.h b/aapl/avlcommon.h index 6cb0b89a..a00455b8 100644 --- a/aapl/avlcommon.h +++ b/aapl/avlcommon.h @@ -885,9 +885,9 @@ template <AVLMEL_TEMPDEF> Element *AvlTree<AVLMEL_TEMPUSE>:: } #ifdef AVL_BASIC - keyRelation = compare( *element, *curEl ); + keyRelation = this->compare( *element, *curEl ); #else - keyRelation = compare( element->BASEKEY(getKey()), + keyRelation = this->compare( element->BASEKEY(getKey()), curEl->BASEKEY(getKey()) ); #endif @@ -924,7 +924,7 @@ template <AVLMEL_TEMPDEF> Element *AvlTree<AVLMEL_TEMPUSE>:: long keyRelation; while (curEl) { - keyRelation = compare( *element, *curEl ); + keyRelation = this->compare( *element, *curEl ); /* Do we go left? */ if ( keyRelation < 0 ) @@ -973,7 +973,7 @@ template <AVLMEL_TEMPDEF> Element *AvlTree<AVLMEL_TEMPUSE>:: return element; } - keyRelation = compare( key, curEl->BASEKEY(getKey()) ); + keyRelation = this->compare( key, curEl->BASEKEY(getKey()) ); /* Do we go left? */ if ( keyRelation < 0 ) { @@ -1027,7 +1027,7 @@ template <AVLMEL_TEMPDEF> Element *AvlTree<AVLMEL_TEMPUSE>:: return element; } - keyRelation = compare(key, curEl->getKey()); + keyRelation = this->compare(key, curEl->getKey()); /* Do we go left? */ if ( keyRelation < 0 ) { @@ -1062,7 +1062,7 @@ template <AVLMEL_TEMPDEF> Element *AvlTree<AVLMEL_TEMPUSE>:: long keyRelation; while (curEl) { - keyRelation = compare( key, curEl->BASEKEY(getKey()) ); + keyRelation = this->compare( key, curEl->BASEKEY(getKey()) ); /* Do we go left? */ if ( keyRelation < 0 ) diff --git a/aapl/bstcommon.h b/aapl/bstcommon.h index 888717f3..16a2a3b4 100644 --- a/aapl/bstcommon.h +++ b/aapl/bstcommon.h @@ -361,7 +361,7 @@ template <BST_TEMPL_DEF> bool BstTable<BST_TEMPL_USE>:: } mid = lower + ((upper-lower)>>1); - keyRelation = compare(key, GET_KEY(*mid)); + keyRelation = this->compare(key, GET_KEY(*mid)); if ( keyRelation < 0 ) upper = mid - 1; @@ -373,12 +373,12 @@ template <BST_TEMPL_DEF> bool BstTable<BST_TEMPL_USE>:: lower = mid - 1; while ( lower != lowEnd && - compare(key, GET_KEY(*lower)) == 0 ) + this->compare(key, GET_KEY(*lower)) == 0 ) lower--; upper = mid + 1; while ( upper != highEnd && - compare(key, GET_KEY(*upper)) == 0 ) + this->compare(key, GET_KEY(*upper)) == 0 ) upper++; low = (Element*)lower + 1; @@ -419,7 +419,7 @@ template <BST_TEMPL_DEF> Element *BstTable<BST_TEMPL_USE>:: } mid = lower + ((upper-lower)>>1); - keyRelation = compare(key, GET_KEY(*mid)); + keyRelation = this->compare(key, GET_KEY(*mid)); if ( keyRelation < 0 ) upper = mid - 1; @@ -457,7 +457,7 @@ template <BST_TEMPL_DEF> Element *BstTable<BST_TEMPL_USE>:: } mid = lower + ((upper-lower)>>1); - keyRelation = compare(key, GET_KEY(*mid)); + keyRelation = this->compare(key, GET_KEY(*mid)); if ( keyRelation < 0 ) upper = mid - 1; @@ -603,7 +603,7 @@ template <BST_TEMPL_DEF> Element *BstTable<BST_TEMPL_USE>:: } mid = lower + ((upper-lower)>>1); - keyRelation = compare(GET_KEY(el), GET_KEY(*mid)); + keyRelation = this->compare(GET_KEY(el), GET_KEY(*mid)); if ( keyRelation < 0 ) upper = mid - 1; @@ -662,7 +662,7 @@ template <BST_TEMPL_DEF> Element *BstTable<BST_TEMPL_USE>:: } mid = lower + ((upper-lower)>>1); - keyRelation = compare(GET_KEY(el), GET_KEY(*mid)); + keyRelation = this->compare(GET_KEY(el), GET_KEY(*mid)); if ( keyRelation < 0 ) upper = mid - 1; diff --git a/aapl/bubblesort.h b/aapl/bubblesort.h index bcc2fb6a..f0f4ce5d 100644 --- a/aapl/bubblesort.h +++ b/aapl/bubblesort.h @@ -72,7 +72,7 @@ template <class T, class Compare> void BubbleSort<T,Compare>:: changed = false; for ( long i = 0; i < len-pass; i++ ) { /* Do we swap pos with the next one? */ - if ( compare( data[i], data[i+1] ) > 0 ) { + if ( this->compare( data[i], data[i+1] ) > 0 ) { char tmp[sizeof(T)]; /* Swap the two items. */ diff --git a/aapl/mergesort.h b/aapl/mergesort.h index 68b84260..8cefa735 100644 --- a/aapl/mergesort.h +++ b/aapl/mergesort.h @@ -110,7 +110,7 @@ template< class T, class Compare> void MergeSort<T,Compare>:: } else { /* Both upper and lower left. */ - if ( compare(*lower, *upper) <= 0 ) + if ( this->compare(*lower, *upper) <= 0 ) memcpy( dest++, lower++, sizeof(T) ); else memcpy( dest++, upper++, sizeof(T) ); |