summaryrefslogtreecommitdiff
path: root/boost/geometry/algorithms/detail/counting.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/geometry/algorithms/detail/counting.hpp')
-rw-r--r--boost/geometry/algorithms/detail/counting.hpp15
1 files changed, 4 insertions, 11 deletions
diff --git a/boost/geometry/algorithms/detail/counting.hpp b/boost/geometry/algorithms/detail/counting.hpp
index 3580740b31..0199ec0b9a 100644
--- a/boost/geometry/algorithms/detail/counting.hpp
+++ b/boost/geometry/algorithms/detail/counting.hpp
@@ -30,8 +30,6 @@
#include <boost/geometry/util/range.hpp>
-#include <boost/geometry/algorithms/detail/interior_iterator.hpp>
-
namespace boost { namespace geometry
{
@@ -67,10 +65,8 @@ struct polygon_count
{
std::size_t n = RangeCount::apply(exterior_ring(poly));
- typename interior_return_type<Polygon const>::type
- rings = interior_rings(poly);
- for (typename detail::interior_iterator<Polygon const>::type
- it = boost::begin(rings); it != boost::end(rings); ++it)
+ auto const& rings = interior_rings(poly);
+ for (auto it = boost::begin(rings); it != boost::end(rings); ++it)
{
n += RangeCount::apply(*it);
}
@@ -84,13 +80,10 @@ template <typename SingleCount>
struct multi_count
{
template <typename MultiGeometry>
- static inline std::size_t apply(MultiGeometry const& geometry)
+ static inline std::size_t apply(MultiGeometry const& multi)
{
std::size_t n = 0;
- for (typename boost::range_iterator<MultiGeometry const>::type
- it = boost::begin(geometry);
- it != boost::end(geometry);
- ++it)
+ for (auto it = boost::begin(multi); it != boost::end(multi); ++it)
{
n += SingleCount::apply(*it);
}