diff --git a/alib2std/src/extensions/container/forward_tree.hpp b/alib2std/src/extensions/container/forward_tree.hpp index b36e280ad8f7428059100052720eec48acb46815..b26490aeac8aa984c0ec29b20c6e21601e56ea29 100644 --- a/alib2std/src/extensions/container/forward_tree.hpp +++ b/alib2std/src/extensions/container/forward_tree.hpp @@ -267,7 +267,7 @@ public: * * \return true if the two iterators are the same, false othervise */ - bool operator ==( const const_structure_iterator & other ) { + bool operator ==( const const_structure_iterator & other ) const { return node == other.node && virtual_node == other.virtual_node; } @@ -279,7 +279,7 @@ public: * * \return true if the two iterators are not the same, false othervise */ - bool operator !=( const const_structure_iterator & other ) { + bool operator !=( const const_structure_iterator & other ) const { return !( * this == other ); } @@ -408,7 +408,7 @@ public: * * \return true if the two iterators are the same, false othervise */ - bool operator ==( const const_prefix_iterator & other ) { + bool operator ==( const const_prefix_iterator & other ) const { return node == other.node; } @@ -420,7 +420,7 @@ public: * * \return true if the two iterators are not the same, false othervise */ - bool operator !=( const const_prefix_iterator & other ) { + bool operator !=( const const_prefix_iterator & other ) const { return !( * this == other ); } @@ -539,7 +539,7 @@ public: * * \return true if the two iterators are the same, false othervise */ - bool operator ==( const const_postfix_iterator & other ) { + bool operator ==( const const_postfix_iterator & other ) const { return node == other.node; } @@ -551,7 +551,7 @@ public: * * \return true if the two iterators are not the same, false othervise */ - bool operator !=( const const_postfix_iterator & other ) { + bool operator !=( const const_postfix_iterator & other ) const { return !( * this == other ); } @@ -1049,7 +1049,7 @@ public: * * \return true if this instance is equal to other instance, false othervise */ - bool operator ==( const forward_tree & other ) { + bool operator ==( const forward_tree & other ) const { return compare ( other ) == 0; } @@ -1061,7 +1061,7 @@ public: * * \return true if this instance is not equal to other instance, false othervise */ - bool operator !=( const forward_tree & other ) { + bool operator !=( const forward_tree & other ) const { return compare ( other ) != 0; } @@ -1073,7 +1073,7 @@ public: * * \return true if this instance is smaller than other instance, false othervise */ - bool operator <( const forward_tree & other ) { + bool operator <( const forward_tree & other ) const { return compare ( other ) < 0; } @@ -1085,7 +1085,7 @@ public: * * \return true if this instance is smaller or equal than other instance, false othervise */ - bool operator <=( const forward_tree & other ) { + bool operator <=( const forward_tree & other ) const { return compare ( other ) <= 0; } @@ -1097,7 +1097,7 @@ public: * * \return true if this instance is greater than other instance, false othervise */ - bool operator >( const forward_tree & other ) { + bool operator >( const forward_tree & other ) const { return compare ( other ) > 0; } @@ -1109,7 +1109,7 @@ public: * * \return true if this instance is greater or equal than other instance, false othervise */ - bool operator >=( const forward_tree & other ) { + bool operator >=( const forward_tree & other ) const { return compare ( other ) >= 0; } diff --git a/alib2std/src/extensions/container/tree.hpp b/alib2std/src/extensions/container/tree.hpp index bed9b6768a60b1179cf22d9aeaa11dafe06aedb9..d4ccf1ed4c47f9780b20fbcd580afe20294acd67 100644 --- a/alib2std/src/extensions/container/tree.hpp +++ b/alib2std/src/extensions/container/tree.hpp @@ -288,7 +288,7 @@ public: * * \return true if the two iterators are the same, false othervise */ - bool operator ==( const const_structure_iterator & other ) { + bool operator ==( const const_structure_iterator & other ) const { return node == other.node && virtual_node == other.virtual_node; } @@ -300,7 +300,7 @@ public: * * \return true if the two iterators are not the same, false othervise */ - bool operator !=( const const_structure_iterator & other ) { + bool operator !=( const const_structure_iterator & other ) const { return !( * this == other ); } @@ -429,7 +429,7 @@ public: * * \return true if the two iterators are the same, false othervise */ - bool operator ==( const const_prefix_iterator & other ) { + bool operator ==( const const_prefix_iterator & other ) const { return node == other.node; } @@ -441,7 +441,7 @@ public: * * \return true if the two iterators are not the same, false othervise */ - bool operator !=( const const_prefix_iterator & other ) { + bool operator !=( const const_prefix_iterator & other ) const { return !( * this == other ); } @@ -560,7 +560,7 @@ public: * * \return true if the two iterators are the same, false othervise */ - bool operator ==( const const_postfix_iterator & other ) { + bool operator ==( const const_postfix_iterator & other ) const { return node == other.node; } @@ -572,7 +572,7 @@ public: * * \return true if the two iterators are not the same, false othervise */ - bool operator !=( const const_postfix_iterator & other ) { + bool operator !=( const const_postfix_iterator & other ) const { return !( * this == other ); } @@ -1172,7 +1172,7 @@ public: * * \return true if this instance is equal to other instance, false othervise */ - bool operator ==( const tree & other ) { + bool operator ==( const tree & other ) const { return compare ( other ) == 0; } @@ -1184,7 +1184,7 @@ public: * * \return true if this instance is not equal to other instance, false othervise */ - bool operator !=( const tree & other ) { + bool operator !=( const tree & other ) const { return compare ( other ) != 0; } @@ -1196,7 +1196,7 @@ public: * * \return true if this instance is smaller than other instance, false othervise */ - bool operator <( const tree & other ) { + bool operator <( const tree & other ) const { return compare ( other ) < 0; } @@ -1208,7 +1208,7 @@ public: * * \return true if this instance is smaller or equal than other instance, false othervise */ - bool operator <=( const tree & other ) { + bool operator <=( const tree & other ) const { return compare ( other ) <= 0; } @@ -1220,7 +1220,7 @@ public: * * \return true if this instance is greater than other instance, false othervise */ - bool operator >( const tree & other ) { + bool operator >( const tree & other ) const { return compare ( other ) > 0; } @@ -1232,7 +1232,7 @@ public: * * \return true if this instance is greater or equal than other instance, false othervise */ - bool operator >=( const tree & other ) { + bool operator >=( const tree & other ) const { return compare ( other ) >= 0; } diff --git a/alib2std/src/extensions/container/trie.hpp b/alib2std/src/extensions/container/trie.hpp index f0a9900fc20828761dd34bf9573c5b0d48a5d88d..0e03be46ba48b004452dc5f06c2908a5468d00ad 100644 --- a/alib2std/src/extensions/container/trie.hpp +++ b/alib2std/src/extensions/container/trie.hpp @@ -505,7 +505,7 @@ public: * * \return true if this instance is equal to other instance, false othervise */ - bool operator ==( const trie & other ) { + bool operator ==( const trie & other ) const { return compare ( other ) == 0; } @@ -517,7 +517,7 @@ public: * * \return true if this instance is not equal to other instance, false othervise */ - bool operator !=( const trie & other ) { + bool operator !=( const trie & other ) const { return compare ( other ) != 0; } @@ -529,7 +529,7 @@ public: * * \return true if this instance is smaller than other instance, false othervise */ - bool operator <( const trie & other ) { + bool operator <( const trie & other ) const { return compare ( other ) < 0; } @@ -541,7 +541,7 @@ public: * * \return true if this instance is smaller or equal than other instance, false othervise */ - bool operator <=( const trie & other ) { + bool operator <=( const trie & other ) const { return compare ( other ) <= 0; } @@ -553,7 +553,7 @@ public: * * \return true if this instance is greater than other instance, false othervise */ - bool operator >( const trie & other ) { + bool operator >( const trie & other ) const { return compare ( other ) > 0; } @@ -565,7 +565,7 @@ public: * * \return true if this instance is greater or equal than other instance, false othervise */ - bool operator >=( const trie & other ) { + bool operator >=( const trie & other ) const { return compare ( other ) >= 0; }