summaryrefslogtreecommitdiff
path: root/boost/geometry/algorithms/unique.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/geometry/algorithms/unique.hpp')
-rw-r--r--boost/geometry/algorithms/unique.hpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/boost/geometry/algorithms/unique.hpp b/boost/geometry/algorithms/unique.hpp
index c953311bbd..618087e14e 100644
--- a/boost/geometry/algorithms/unique.hpp
+++ b/boost/geometry/algorithms/unique.hpp
@@ -24,7 +24,6 @@
#include <boost/range/begin.hpp>
#include <boost/range/end.hpp>
-#include <boost/geometry/algorithms/detail/interior_iterator.hpp>
#include <boost/geometry/core/interior_rings.hpp>
#include <boost/geometry/core/mutable_range.hpp>
#include <boost/geometry/core/tags.hpp>
@@ -46,7 +45,7 @@ struct range_unique
template <typename Range, typename ComparePolicy>
static inline void apply(Range& range, ComparePolicy const& policy)
{
- typename boost::range_iterator<Range>::type it
+ auto it
= std::unique
(
boost::begin(range),
@@ -66,11 +65,9 @@ struct polygon_unique
{
range_unique::apply(exterior_ring(polygon), policy);
- typename interior_return_type<Polygon>::type
- rings = interior_rings(polygon);
+ auto&& rings = interior_rings(polygon);
- for (typename detail::interior_iterator<Polygon>::type
- it = boost::begin(rings); it != boost::end(rings); ++it)
+ for (auto it = boost::begin(rings); it != boost::end(rings); ++it)
{
range_unique::apply(*it, policy);
}
@@ -84,10 +81,7 @@ struct multi_unique
template <typename MultiGeometry, typename ComparePolicy>
static inline void apply(MultiGeometry& multi, ComparePolicy const& compare)
{
- for (typename boost::range_iterator<MultiGeometry>::type
- it = boost::begin(multi);
- it != boost::end(multi);
- ++it)
+ for (auto it = boost::begin(multi); it != boost::end(multi); ++it)
{
Policy::apply(*it, compare);
}