]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/geometry/algorithms/detail/disjoint/linear_segment_or_box.hpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / boost / geometry / algorithms / detail / disjoint / linear_segment_or_box.hpp
index 0f0036117b76974d9d292e70b999c0581a6bda50..4424f144b020b4d0de5a9c8a5d5613a4ff2aa092 100644 (file)
@@ -5,8 +5,8 @@
 // Copyright (c) 2009-2014 Mateusz Loskot, London, UK.
 // Copyright (c) 2013-2014 Adam Wulkiewicz, Lodz, Poland.
 
-// This file was modified by Oracle on 2013-2020.
-// Modifications copyright (c) 2013-2020, Oracle and/or its affiliates.
+// This file was modified by Oracle on 2013-2021.
+// Modifications copyright (c) 2013-2021, Oracle and/or its affiliates.
 
 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
 // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
@@ -58,8 +58,7 @@ struct disjoint_point_segment_or_box<Segment, segment_tag>
         return dispatch::disjoint
             <
                 Point, Segment
-            >::apply(point, segment,
-                     strategy.template get_point_in_geometry_strategy<Point, Segment>());
+            >::apply(point, segment, strategy);
     }
 };
 
@@ -72,18 +71,12 @@ struct disjoint_point_segment_or_box<Box, box_tag>
         return dispatch::disjoint
             <
                 Point, Box
-            >::apply(point, box,
-                     strategy.get_disjoint_point_box_strategy());
+            >::apply(point, box, strategy);
     }
 };
 
 
-template
-<
-    typename Range,
-    closure_selector Closure,
-    typename SegmentOrBox
->
+template <typename Range, typename SegmentOrBox>
 struct disjoint_range_segment_or_box
 {
     template <typename Strategy>
@@ -91,24 +84,12 @@ struct disjoint_range_segment_or_box
                              SegmentOrBox const& segment_or_box,
                              Strategy const& strategy)
     {
-        typedef typename closeable_view<Range const, Closure>::type view_type;
-
-        typedef typename ::boost::range_value<view_type>::type point_type;
-        typedef typename ::boost::range_iterator
-            <
-                view_type const
-            >::type const_iterator;
-
-        typedef typename ::boost::range_size<view_type>::type size_type;
-
-        typedef typename geometry::model::referring_segment
-            <
-                point_type const
-            > range_segment;
+        using point_type = typename point_type<Range>::type;
+        using range_segment = typename geometry::model::referring_segment<point_type const>;
 
-        view_type view(range);
+        detail::closed_view<Range const> const view(range);
 
-        const size_type count = ::boost::size(view);
+        auto const count = ::boost::size(view);
 
         if ( count == 0 )
         {
@@ -119,15 +100,13 @@ struct disjoint_range_segment_or_box
             return disjoint_point_segment_or_box
                 <
                     SegmentOrBox
-                >::apply(geometry::range::front<view_type const>(view),
-                         segment_or_box,
-                         strategy);
+                >::apply(range::front(view), segment_or_box, strategy);
         }
         else
         {
-            const_iterator it0 = ::boost::begin(view);
-            const_iterator it1 = ::boost::begin(view) + 1;
-            const_iterator last = ::boost::end(view);
+            auto it0 = ::boost::begin(view);
+            auto it1 = ::boost::begin(view) + 1;
+            auto const last = ::boost::end(view);
 
             for ( ; it1 != last ; ++it0, ++it1 )
             {
@@ -163,7 +142,7 @@ struct disjoint_linear_segment_or_box
 
 template <typename Linestring, typename SegmentOrBox>
 struct disjoint_linear_segment_or_box<Linestring, SegmentOrBox, linestring_tag>
-    : disjoint_range_segment_or_box<Linestring, closed, SegmentOrBox>
+    : disjoint_range_segment_or_box<Linestring, SegmentOrBox>
 {};