]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/geometry/algorithms/detail/overlay/get_turn_info_for_endpoint.hpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / boost / geometry / algorithms / detail / overlay / get_turn_info_for_endpoint.hpp
index c17fcb86377fd2de8dffa7e49e1e5613e499f581..2b56d7dd57d4e69b35d3b94823c8a260d0aecd27 100644 (file)
@@ -2,8 +2,8 @@
 
 // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
 
-// This file was modified by Oracle on 2013, 2014, 2017, 2018.
-// Modifications copyright (c) 2013-2018 Oracle and/or its affiliates.
+// This file was modified by Oracle on 2013-2020.
+// Modifications copyright (c) 2013-2020 Oracle and/or its affiliates.
 
 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
 
@@ -111,12 +111,16 @@ namespace detail { namespace overlay {
 class linear_intersections
 {
 public:
-    template <typename Point1, typename Point2, typename IntersectionResult, typename EqPPStrategy>
+    template
+    <
+        typename Point1, typename Point2, typename IntersectionResult,
+        typename Strategy
+    >
     linear_intersections(Point1 const& pi,
                          Point2 const& qi,
                          IntersectionResult const& result,
                          bool is_p_last, bool is_q_last,
-                         EqPPStrategy const& strategy)
+                         Strategy const& strategy)
     {
         int arrival_a = result.direction.arrival[0];
         int arrival_b = result.direction.arrival[1];
@@ -237,7 +241,7 @@ struct get_turn_info_for_endpoint
              typename TurnInfo,
              typename IntersectionInfo,
              typename OutputIterator,
-             typename EqPPStrategy
+             typename Strategy
     >
     static inline bool apply(UniqueSubRange1 const& range_p,
                              UniqueSubRange2 const& range_q,
@@ -245,7 +249,7 @@ struct get_turn_info_for_endpoint
                              IntersectionInfo const& inters,
                              method_type /*method*/,
                              OutputIterator out,
-                             EqPPStrategy const& strategy)
+                             Strategy const& strategy)
     {
         std::size_t ip_count = inters.i_info().count;
         // no intersection points
@@ -398,8 +402,7 @@ struct get_turn_info_for_endpoint
     {
         boost::ignore_unused(ip_index, tp_model);
 
-        typename IntersectionInfo::side_strategy_type const& sides
-                = inters.get_side_strategy();
+        auto const strategy = inters.strategy();
 
         if ( !first2 && !last2 )
         {
@@ -409,8 +412,8 @@ struct get_turn_info_for_endpoint
                 // may this give false positives for INTs?
                 typename IntersectionResult::point_type const&
                     inters_pt = inters.i_info().intersections[ip_index];
-                BOOST_GEOMETRY_ASSERT(ip_i2 == equals::equals_point_point(i2, inters_pt));
-                BOOST_GEOMETRY_ASSERT(ip_j2 == equals::equals_point_point(j2, inters_pt));
+                BOOST_GEOMETRY_ASSERT(ip_i2 == equals::equals_point_point(i2, inters_pt, strategy));
+                BOOST_GEOMETRY_ASSERT(ip_j2 == equals::equals_point_point(j2, inters_pt, strategy));
 #endif
                 if ( ip_i2 )
                 {
@@ -421,6 +424,7 @@ struct get_turn_info_for_endpoint
                 }
                 else if ( ip_j2 )
                 {
+                    auto const sides = strategy.side();
                     int const side_pj_q2 = sides.apply(range2.at(1), range2.at(2), range1.at(1));
                     int const side_pj_q1 = sides.apply(range2.at(0), range2.at(1), range1.at(1));
                     int const side_qk_q1 = sides.apply(range2.at(0), range2.at(1), range2.at(2));
@@ -460,8 +464,8 @@ struct get_turn_info_for_endpoint
                 // may this give false positives for INTs?
                 typename IntersectionResult::point_type const&
                     inters_pt = inters.i_info().intersections[ip_index];
-                BOOST_GEOMETRY_ASSERT(ip_i2 == equals::equals_point_point(i2, inters_pt));
-                BOOST_GEOMETRY_ASSERT(ip_j2 == equals::equals_point_point(j2, inters_pt));
+                BOOST_GEOMETRY_ASSERT(ip_i2 == equals::equals_point_point(i2, inters_pt, strategy));
+                BOOST_GEOMETRY_ASSERT(ip_j2 == equals::equals_point_point(j2, inters_pt, strategy));
 #endif
                 if ( ip_i2 )
                 {
@@ -472,6 +476,7 @@ struct get_turn_info_for_endpoint
                 }
                 else if ( ip_j2 )
                 {
+                    auto const sides = strategy.side();
                     int const side_pi_q2 = sides.apply(range2.at(1), range2.at(2), range1.at(0));
                     int const side_pi_q1 = sides.apply(range2.at(0), range2.at(1), range1.at(0));
                     int const side_qk_q1 = sides.apply(range2.at(0), range2.at(1), range2.at(2));