From 4e5da910afb89b321733f348448796813fcd3ce1 Mon Sep 17 00:00:00 2001 From: Menelaos Karavelas Date: Tue, 14 Jul 2015 20:42:16 +0300 Subject: [PATCH] [algorithms][is_valid] rename method find_not_equal to find_different_from_first (for clarity) --- .../algorithms/detail/is_valid/has_spikes.hpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/include/boost/geometry/algorithms/detail/is_valid/has_spikes.hpp b/include/boost/geometry/algorithms/detail/is_valid/has_spikes.hpp index c2eb638aa..aa90e52db 100644 --- a/include/boost/geometry/algorithms/detail/is_valid/has_spikes.hpp +++ b/include/boost/geometry/algorithms/detail/is_valid/has_spikes.hpp @@ -79,7 +79,8 @@ template struct has_spikes { template - static inline Iterator find_not_equal(Iterator first, Iterator last) + static inline Iterator find_different_from_first(Iterator first, + Iterator last) { typedef not_equal_to::type> not_equal; @@ -105,7 +106,7 @@ struct has_spikes iterator prev = boost::begin(view); - iterator cur = find_not_equal(prev, boost::end(view)); + iterator cur = find_different_from_first(prev, boost::end(view)); if (cur == boost::end(view)) { // the range has only one distinct point, so it @@ -113,7 +114,7 @@ struct has_spikes return ! visitor.template apply(); } - iterator next = find_not_equal(cur, boost::end(view)); + iterator next = find_different_from_first(cur, boost::end(view)); if (next == boost::end(view)) { // the range has only two distinct points, so it @@ -132,7 +133,7 @@ struct has_spikes } prev = cur; cur = next; - next = find_not_equal(cur, boost::end(view)); + next = find_different_from_first(cur, boost::end(view)); } if (geometry::equals(range::front(view), range::back(view))) @@ -141,10 +142,10 @@ struct has_spikes typename boost::range_reverse_iterator < view_type const - >::type prev = find_not_equal(boost::rbegin(view), - boost::rend(view)); + >::type prev = find_different_from_first(boost::rbegin(view), + boost::rend(view)); - iterator next = find_not_equal(cur, boost::end(view)); + iterator next = find_different_from_first(cur, boost::end(view)); if (detail::point_is_spike_or_equal(*prev, *next, *cur)) { return