From edfb2c29c07faecb96f15ec3c596e2da7a33dfce Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Sat, 26 Apr 2014 03:21:10 +0200 Subject: [PATCH] [get_turns] Change parameters of intersection_info::is_spike_of_collinear() --- .../detail/overlay/get_turn_info_for_endpoint.hpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/include/boost/geometry/algorithms/detail/overlay/get_turn_info_for_endpoint.hpp b/include/boost/geometry/algorithms/detail/overlay/get_turn_info_for_endpoint.hpp index d75b2cc1d..5a7b5599b 100644 --- a/include/boost/geometry/algorithms/detail/overlay/get_turn_info_for_endpoint.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/get_turn_info_for_endpoint.hpp @@ -93,8 +93,7 @@ public: { if ( qk_p1 == 0 ) { - return is_spike_of_collinear(segment_type1(pi(), pj()), - segment_type1(pj(), pk())); + return is_spike_of_collinear(pi(), pj(), pk()); } return true; @@ -115,8 +114,7 @@ public: { if ( pk_q1 == 0 ) { - return is_spike_of_collinear(segment_type2(qi(), qj()), - segment_type2(qj(), qk())); + return is_spike_of_collinear(qi(), qj(), qk()); } return true; @@ -128,10 +126,10 @@ public: private: template - inline bool is_spike_of_collinear( - model::referring_segment const& s1, - model::referring_segment const& s2) const + inline bool is_spike_of_collinear(Point const& i, Point const& j, Point const& k) const { + typedef model::referring_segment seg_t; + typedef strategy_intersection < typename cs_tag::type, Point, Point, Point, RobustPolicy @@ -139,7 +137,8 @@ private: typedef typename si::segment_intersection_strategy_type strategy; - typename strategy::return_type result = strategy::apply(s1, s2, m_robust_policy); + typename strategy::return_type result + = strategy::apply(seg_t(i, j), seg_t(j, k), m_robust_policy); return result.template get<0>().count == 2; }