summaryrefslogtreecommitdiff
path: root/boost/geometry/algorithms/detail/overlay/pointlike_pointlike.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/geometry/algorithms/detail/overlay/pointlike_pointlike.hpp')
-rw-r--r--boost/geometry/algorithms/detail/overlay/pointlike_pointlike.hpp29
1 files changed, 13 insertions, 16 deletions
diff --git a/boost/geometry/algorithms/detail/overlay/pointlike_pointlike.hpp b/boost/geometry/algorithms/detail/overlay/pointlike_pointlike.hpp
index a46fc8b5f7..4ad311277a 100644
--- a/boost/geometry/algorithms/detail/overlay/pointlike_pointlike.hpp
+++ b/boost/geometry/algorithms/detail/overlay/pointlike_pointlike.hpp
@@ -1,7 +1,10 @@
// Boost.Geometry (aka GGL, Generic Geometry Library)
-// Copyright (c) 2014-2020, Oracle and/or its affiliates.
+// Copyright (c) 2023 Adam Wulkiewicz, Lodz, Poland.
+// Copyright (c) 2014-2023, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
@@ -33,6 +36,8 @@
#include <boost/geometry/policies/compare.hpp>
+#include <boost/geometry/util/condition.hpp>
+
namespace boost { namespace geometry
{
@@ -75,9 +80,7 @@ struct copy_points<PointOut, MultiPointIn, multi_point_tag>
static inline void apply(MultiPointIn const& multi_point_in,
OutputIterator& oit)
{
- for (typename boost::range_iterator<MultiPointIn const>::type
- it = boost::begin(multi_point_in);
- it != boost::end(multi_point_in); ++it)
+ for (auto it = boost::begin(multi_point_in); it != boost::end(multi_point_in); ++it)
{
PointOut point_out;
geometry::convert(*it, point_out);
@@ -189,9 +192,7 @@ struct multipoint_point_point
{
BOOST_GEOMETRY_ASSERT( OverlayType == overlay_difference );
- for (typename boost::range_iterator<MultiPoint const>::type
- it = boost::begin(multipoint);
- it != boost::end(multipoint); ++it)
+ for (auto it = boost::begin(multipoint); it != boost::end(multipoint); ++it)
{
action_selector_pl
<
@@ -225,9 +226,7 @@ struct point_multipoint_point
{
typedef action_selector_pl<PointOut, OverlayType> action;
- for (typename boost::range_iterator<MultiPoint const>::type
- it = boost::begin(multipoint);
- it != boost::end(multipoint); ++it)
+ for (auto it = boost::begin(multipoint); it != boost::end(multipoint); ++it)
{
if ( detail::equals::equals_point_point(*it, point, strategy) )
{
@@ -260,10 +259,10 @@ struct multipoint_multipoint_point
OutputIterator oit,
Strategy const& strategy)
{
- typedef geometry::less<void, -1, typename Strategy::cs_tag> less_type;
+ typedef geometry::less<void, -1, Strategy> less_type;
- if ( OverlayType != overlay_difference
- && boost::size(multipoint1) > boost::size(multipoint2) )
+ if (BOOST_GEOMETRY_CONDITION(OverlayType != overlay_difference)
+ && boost::size(multipoint1) > boost::size(multipoint2))
{
return multipoint_multipoint_point
<
@@ -279,9 +278,7 @@ struct multipoint_multipoint_point
less_type const less = less_type();
std::sort(points2.begin(), points2.end(), less);
- for (typename boost::range_iterator<MultiPoint1 const>::type
- it1 = boost::begin(multipoint1);
- it1 != boost::end(multipoint1); ++it1)
+ for (auto it1 = boost::begin(multipoint1); it1 != boost::end(multipoint1); ++it1)
{
bool found = std::binary_search(points2.begin(), points2.end(),
*it1, less);