diff options
author | Adrian Thurston <thurston@complang.org> | 2014-12-07 16:50:49 -0500 |
---|---|---|
committer | Adrian Thurston <thurston@complang.org> | 2014-12-07 16:50:49 -0500 |
commit | 1de6249aa3c481e5ff582b95dac49c8fbf04f8c9 (patch) | |
tree | 0fc1a8509c7d8e42dbbb4e83bff619e4870acb2b /src/parsetree.cc | |
parent | e1b207d6d2642d545f151429d9ffd662d6a82494 (diff) | |
download | colm-1de6249aa3c481e5ff582b95dac49c8fbf04f8c9.tar.gz |
start on the object-based list implementation (list2)
Diffstat (limited to 'src/parsetree.cc')
-rw-r--r-- | src/parsetree.cc | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/parsetree.cc b/src/parsetree.cc index 037e6c2b..acb482d1 100644 --- a/src/parsetree.cc +++ b/src/parsetree.cc @@ -154,6 +154,46 @@ int CmpUniqueList::compare( const UniqueList &ut1, const UniqueList &ut2 ) return 0; } +int CmpUniqueList2El::compare( const UniqueList2El &ut1, const UniqueList2El &ut2 ) +{ + if ( ut1.value < ut2.value ) + return -1; + else if ( ut1.value > ut2.value ) + return 1; + + return 0; +} + +int CmpUniqueList2::compare( const UniqueList2 &ut1, const UniqueList2 &ut2 ) +{ + if ( ut1.value < ut2.value ) + return -1; + else if ( ut1.value > ut2.value ) + return 1; + + return 0; +} + +int CmpUniqueMap2El::compare( const UniqueMap2El &ut1, const UniqueMap2El &ut2 ) +{ + if ( ut1.value < ut2.value ) + return -1; + else if ( ut1.value > ut2.value ) + return 1; + + return 0; +} + +int CmpUniqueMap2::compare( const UniqueMap2 &ut1, const UniqueMap2 &ut2 ) +{ + if ( ut1.value < ut2.value ) + return -1; + else if ( ut1.value > ut2.value ) + return 1; + + return 0; +} + int CmpUniqueVector::compare( const UniqueVector &ut1, const UniqueVector &ut2 ) { if ( ut1.value < ut2.value ) |