diff options
Diffstat (limited to '3rdParty/Boost/src/boost/range/algorithm/equal.hpp')
-rw-r--r--[-rwxr-xr-x] | 3rdParty/Boost/src/boost/range/algorithm/equal.hpp | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/3rdParty/Boost/src/boost/range/algorithm/equal.hpp b/3rdParty/Boost/src/boost/range/algorithm/equal.hpp index a3ebc29..4472bb1 100755..100644 --- a/3rdParty/Boost/src/boost/range/algorithm/equal.hpp +++ b/3rdParty/Boost/src/boost/range/algorithm/equal.hpp @@ -31,7 +31,7 @@ namespace boost IteratorCategoryTag1, IteratorCategoryTag2 ) { - do + while (true) { // If we have reached the end of the left range then this is // the end of the loop. They are equal if and only if we have @@ -46,7 +46,12 @@ namespace boost return false; // continue looping if and only if the values are equal - } while(*first1++ == *first2++); + if (*first1 != *first2) + break; + + ++first1; + ++first2; + } // Reaching this line in the algorithm indicates that a value // inequality has been detected. @@ -66,7 +71,7 @@ namespace boost IteratorCategoryTag1, IteratorCategoryTag2 ) { - do + while (true) { // If we have reached the end of the left range then this is // the end of the loop. They are equal if and only if we have @@ -81,7 +86,12 @@ namespace boost return false; // continue looping if and only if the values are equal - } while(pred(*first1++, *first2++)); + if (!pred(*first1, *first2)) + break; + + ++first1; + ++first2; + } // Reaching this line in the algorithm indicates that a value // inequality has been detected. @@ -182,7 +192,7 @@ namespace boost } } // namespace range - using range::equal; + using ::boost::range::equal; } // namespace boost #endif // include guard |