]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/geometry/test/algorithms/overlay/traverse_ccw.cpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / libs / geometry / test / algorithms / overlay / traverse_ccw.cpp
index f939808605b115a894ef269eb7b59d872adb5122..a3f643606e68df78ca3f84ac0cab2c27e8863668 100644 (file)
@@ -3,6 +3,10 @@
 
 // Copyright (c) 2010-2012 Barend Gehrels, Amsterdam, the Netherlands.
 
+// This file was modified by Oracle on 2021.
+// Modifications copyright (c) 2021, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
 // Use, modification and distribution is subject to the Boost Software License,
 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 #include <iostream>
 #include <iomanip>
 
-#include <boost/foreach.hpp>
-
 #include <geometry_test_common.hpp>
 
-#include <boost/geometry/geometry.hpp>
+#include <boost/geometry/algorithms/correct.hpp>
+#include <boost/geometry/algorithms/detail/overlay/debug_turn_info.hpp>
+#include <boost/geometry/algorithms/detail/overlay/overlay.hpp>
 #include <boost/geometry/geometries/point_xy.hpp>
 #include <boost/geometry/geometries/polygon.hpp>
 #include <boost/geometry/io/wkt/wkt.hpp>
 #  include <boost/geometry/io/svg/svg_mapper.hpp>
 #endif
 
-#include <boost/geometry/algorithms/detail/overlay/debug_turn_info.hpp>
 #include <boost/geometry/policies/robustness/get_rescale_policy.hpp>
 
 #include <algorithms/overlay/overlay_cases.hpp>
 
 template <typename Geometry>
-struct rev : boost::mpl::if_c<bg::point_order<Geometry>::value == bg::counterclockwise, boost::true_type, boost::false_type>::type
-{};
+using rev = bg::util::bool_constant<bg::point_order<Geometry>::value == bg::counterclockwise>;
 
 template <typename Geometry1, typename Geometry2>
 inline typename bg::coordinate_type<Geometry1>::type
@@ -89,7 +91,7 @@ intersect(Geometry1 const& g1, Geometry2 const& g2, std::string const& name,
         >::apply(g1, g2, op, rescale_policy, turns, v);
 
     typename bg::coordinate_type<Geometry1>::type result = 0.0;
-    BOOST_FOREACH(ring_type& ring, v)
+    for (ring_type& ring : v)
     {
         result += bg::area(ring);
     }
@@ -117,7 +119,7 @@ intersect(Geometry1 const& g1, Geometry2 const& g2, std::string const& name,
                 "stroke:rgb(51,51,153);stroke-width:3");
 
         // Traversal rings in magenta/light yellow fill
-        BOOST_FOREACH(ring_type const& ring, v)
+        for  (ring_type const& ring : v)
         {
             mapper.map(ring, "fill-opacity:0.3;stroke-opacity:0.4;fill:rgb(255,255,0);"
                     "stroke:rgb(255,0,255);stroke-width:8");
@@ -132,7 +134,7 @@ intersect(Geometry1 const& g1, Geometry2 const& g2, std::string const& name,
         int const lineheight = 10;
         int const margin = 5;
 
-        BOOST_FOREACH(turn_info const& turn, turns)
+        for (turn_info const& turn : turns)
         {
             mapper.map(turn.point, "fill:rgb(255,128,0);"
                     "stroke:rgb(0,0,0);stroke-width:1", 3);