diff options
Diffstat (limited to 'boost/geometry/algorithms/detail/overlay/add_rings.hpp')
-rw-r--r-- | boost/geometry/algorithms/detail/overlay/add_rings.hpp | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/boost/geometry/algorithms/detail/overlay/add_rings.hpp b/boost/geometry/algorithms/detail/overlay/add_rings.hpp index 45f2e7f12f..026906b496 100644 --- a/boost/geometry/algorithms/detail/overlay/add_rings.hpp +++ b/boost/geometry/algorithms/detail/overlay/add_rings.hpp @@ -96,8 +96,6 @@ inline OutputIterator add_rings(SelectionMap const& map, Strategy const& strategy, add_rings_error_handling error_handling = add_rings_ignore_unordered) { - typedef typename SelectionMap::const_iterator iterator; - std::size_t const min_num_points = core_detail::closure::minimum_ring_size < geometry::closure @@ -110,29 +108,23 @@ inline OutputIterator add_rings(SelectionMap const& map, >::value; - for (iterator it = boost::begin(map); - it != boost::end(map); - ++it) + for (auto const& pair : map) { - if (! it->second.discarded - && it->second.parent.source_index == -1) + if (! pair.second.discarded + && pair.second.parent.source_index == -1) { GeometryOut result; convert_and_add(result, geometry1, geometry2, collection, - it->first, it->second.reversed, false); + pair.first, pair.second.reversed, false); // Add children - for (typename std::vector<ring_identifier>::const_iterator child_it - = it->second.children.begin(); - child_it != it->second.children.end(); - ++child_it) + for (auto const& child : pair.second.children) { - iterator mit = map.find(*child_it); - if (mit != map.end() - && ! mit->second.discarded) + auto mit = map.find(child); + if (mit != map.end() && ! mit->second.discarded) { convert_and_add(result, geometry1, geometry2, collection, - *child_it, mit->second.reversed, true); + child, mit->second.reversed, true); } } |