From 333cfdccfb14100b259b852271cab9e6175fb457 Mon Sep 17 00:00:00 2001 From: Menelaos Karavelas Date: Mon, 28 Apr 2014 10:29:45 +0300 Subject: [PATCH] [turns] rename less functor from less_seg_dist_other_op to less_seg_fraction_other_op (to indicate that the fraction comparison is now used) --- .../geometry/algorithms/detail/overlay/linear_linear.hpp | 2 +- .../geometry/algorithms/detail/turns/compare_turns.hpp | 4 ++-- test/algorithms/test_get_turns_ll_invariance.hpp | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/boost/geometry/algorithms/detail/overlay/linear_linear.hpp b/include/boost/geometry/algorithms/detail/overlay/linear_linear.hpp index d0a4d56f0..3db50f589 100644 --- a/include/boost/geometry/algorithms/detail/overlay/linear_linear.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/linear_linear.hpp @@ -201,7 +201,7 @@ protected: // sort by seg_id, distance, and operation std::sort(boost::begin(turns), boost::end(turns), - detail::turns::less_seg_dist_other_op<>()); + detail::turns::less_seg_fraction_other_op<>()); // remove duplicate turns turns::remove_duplicate_turns diff --git a/include/boost/geometry/algorithms/detail/turns/compare_turns.hpp b/include/boost/geometry/algorithms/detail/turns/compare_turns.hpp index f06140b7b..7e21c654e 100644 --- a/include/boost/geometry/algorithms/detail/turns/compare_turns.hpp +++ b/include/boost/geometry/algorithms/detail/turns/compare_turns.hpp @@ -27,14 +27,14 @@ namespace detail { namespace turns // TURNS SORTING AND SEARCHING // sort turns by G1 - source_index == 0 by: -// seg_id -> distance -> other_id -> operation +// seg_id -> fraction -> other_id -> operation template < typename IdLess = std::less, int N = 0, int U = 1, int I = 2, int B = 3, int C = 4, int O = 0, std::size_t OpId = 0 > -struct less_seg_dist_other_op +struct less_seg_fraction_other_op { BOOST_STATIC_ASSERT(OpId < 2); diff --git a/test/algorithms/test_get_turns_ll_invariance.hpp b/test/algorithms/test_get_turns_ll_invariance.hpp index 460face4e..b0c981e64 100644 --- a/test/algorithms/test_get_turns_ll_invariance.hpp +++ b/test/algorithms/test_get_turns_ll_invariance.hpp @@ -122,16 +122,16 @@ public: filter_continue_turns::apply(rturns_wo_cont); std::sort(boost::begin(turns_all), boost::end(turns_all), - bg_turns::less_seg_dist_other_op<>()); + bg_turns::less_seg_fraction_other_op<>()); std::sort(boost::begin(turns_wo_cont), boost::end(turns_wo_cont), - bg_turns::less_seg_dist_other_op<>()); + bg_turns::less_seg_fraction_other_op<>()); std::sort(boost::begin(rturns_all), boost::end(rturns_all), - bg_turns::less_seg_dist_other_op >()); + bg_turns::less_seg_fraction_other_op >()); std::sort(boost::begin(rturns_wo_cont), boost::end(rturns_wo_cont), - bg_turns::less_seg_dist_other_op >()); + bg_turns::less_seg_fraction_other_op >()); remove_duplicate_turns::apply(turns_all); remove_duplicate_turns::apply(turns_wo_cont);