summaryrefslogtreecommitdiff
path: root/boost/geometry/algorithms/detail/overlay/overlay.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/geometry/algorithms/detail/overlay/overlay.hpp')
-rw-r--r--boost/geometry/algorithms/detail/overlay/overlay.hpp31
1 files changed, 9 insertions, 22 deletions
diff --git a/boost/geometry/algorithms/detail/overlay/overlay.hpp b/boost/geometry/algorithms/detail/overlay/overlay.hpp
index 7d960987d4..e0451f9dd6 100644
--- a/boost/geometry/algorithms/detail/overlay/overlay.hpp
+++ b/boost/geometry/algorithms/detail/overlay/overlay.hpp
@@ -103,10 +103,6 @@ template
>
inline void get_ring_turn_info(TurnInfoMap& turn_info_map, Turns const& turns, Clusters const& clusters)
{
- typedef typename boost::range_value<Turns>::type turn_type;
- typedef typename turn_type::turn_operation_type turn_operation_type;
- typedef typename turn_type::container_type container_type;
-
static const operation_type target_operation
= operation_from_overlay<OverlayType>::value;
static const operation_type opposite_operation
@@ -114,13 +110,8 @@ inline void get_ring_turn_info(TurnInfoMap& turn_info_map, Turns const& turns, C
? operation_intersection
: operation_union;
- for (typename boost::range_iterator<Turns const>::type
- it = boost::begin(turns);
- it != boost::end(turns);
- ++it)
+ for (auto const& turn : turns)
{
- turn_type const& turn = *it;
-
bool cluster_checked = false;
bool has_blocked = false;
@@ -130,12 +121,8 @@ inline void get_ring_turn_info(TurnInfoMap& turn_info_map, Turns const& turns, C
continue;
}
- for (typename boost::range_iterator<container_type const>::type
- op_it = boost::begin(turn.operations);
- op_it != boost::end(turn.operations);
- ++op_it)
+ for (auto const& op : turn.operations)
{
- turn_operation_type const& op = *op_it;
ring_identifier const ring_id = ring_id_by_seg_id(op.seg_id);
if (! is_self_turn<OverlayType>(turn)
@@ -369,12 +356,9 @@ std::cout << "traverse" << std::endl;
// Add rings created during traversal
{
ring_identifier id(2, 0, -1);
- for (typename boost::range_iterator<ring_container_type>::type
- it = boost::begin(rings);
- it != boost::end(rings);
- ++it)
+ for (auto const& ring : rings)
{
- selected_ring_properties[id] = properties(*it, strategy);
+ selected_ring_properties[id] = properties(ring, strategy);
selected_ring_properties[id].reversed = ReverseOut;
id.multi_index++;
}
@@ -392,15 +376,18 @@ std::cout << "traverse" << std::endl;
// it can be returned or an exception can be thrown.
return add_rings<GeometryOut>(selected_ring_properties, geometry1, geometry2, rings, out,
strategy,
- OverlayType == overlay_union ?
#if defined(BOOST_GEOMETRY_UNION_THROW_INVALID_OUTPUT_EXCEPTION)
+ OverlayType == overlay_union ?
add_rings_throw_if_reversed
+ : add_rings_ignore_unordered
#elif defined(BOOST_GEOMETRY_UNION_RETURN_INVALID)
+ OverlayType == overlay_union ?
add_rings_add_unordered
+ : add_rings_ignore_unordered
#else
add_rings_ignore_unordered
#endif
- : add_rings_ignore_unordered);
+ );
}
template <typename RobustPolicy, typename OutputIterator, typename Strategy>