summaryrefslogtreecommitdiff
path: root/boost/geometry/algorithms/detail/relate/follow_helpers.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/geometry/algorithms/detail/relate/follow_helpers.hpp')
-rw-r--r--boost/geometry/algorithms/detail/relate/follow_helpers.hpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/boost/geometry/algorithms/detail/relate/follow_helpers.hpp b/boost/geometry/algorithms/detail/relate/follow_helpers.hpp
index 78fa03798d..2c44b009e7 100644
--- a/boost/geometry/algorithms/detail/relate/follow_helpers.hpp
+++ b/boost/geometry/algorithms/detail/relate/follow_helpers.hpp
@@ -14,6 +14,7 @@
#ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_RELATE_FOLLOW_HELPERS_HPP
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_RELATE_FOLLOW_HELPERS_HPP
+#include <boost/geometry/util/condition.hpp>
#include <boost/geometry/util/range.hpp>
//#include <boost/geometry/algorithms/detail/sub_range.hpp>
@@ -98,9 +99,9 @@ struct for_each_disjoint_geometry_if<OpId, Geometry, Tag, true>
std::vector<bool> detected_intersections(count, false);
for ( TurnIt it = first ; it != last ; ++it )
{
- int multi_index = it->operations[OpId].seg_id.multi_index;
+ signed_index_type multi_index = it->operations[OpId].seg_id.multi_index;
BOOST_ASSERT(multi_index >= 0);
- std::size_t index = static_cast<std::size_t>(multi_index);
+ std::size_t const index = static_cast<std::size_t>(multi_index);
BOOST_ASSERT(index < count);
detected_intersections[index] = true;
}
@@ -116,8 +117,8 @@ struct for_each_disjoint_geometry_if<OpId, Geometry, Tag, true>
if ( *it == false )
{
found = true;
- bool cont = pred(range::at(geometry,
- std::distance(detected_intersections.begin(), it)));
+ std::size_t const index = std::size_t(std::distance(detected_intersections.begin(), it));
+ bool cont = pred(range::at(geometry, index));
if ( !cont )
break;
}
@@ -375,14 +376,14 @@ static inline bool is_ip_on_boundary(IntersectionPoint const& ip,
bool res = false;
// IP on the last point of the linestring
- if ( (BoundaryQuery == boundary_back || BoundaryQuery == boundary_any)
+ if ( BOOST_GEOMETRY_CONDITION(BoundaryQuery == boundary_back || BoundaryQuery == boundary_any)
&& operation_info.position == overlay::position_back )
{
// check if this point is a boundary
res = boundary_checker.template is_endpoint_boundary<boundary_back>(ip);
}
// IP on the last point of the linestring
- else if ( (BoundaryQuery == boundary_front || BoundaryQuery == boundary_any)
+ else if ( BOOST_GEOMETRY_CONDITION(BoundaryQuery == boundary_front || BoundaryQuery == boundary_any)
&& operation_info.position == overlay::position_front )
{
// check if this point is a boundary