mirror of
https://github.com/boostorg/geometry.git
synced 2026-02-12 00:02:09 +00:00
[relate] fix error in static handler set dispatch, require const boundary checkers in algorithms
This commit is contained in:
@@ -96,13 +96,13 @@ public:
|
||||
{}
|
||||
|
||||
template <boundary_query BoundaryQuery>
|
||||
bool is_endpoint_boundary(point_type const& pt)
|
||||
bool is_endpoint_boundary(point_type const& pt) const
|
||||
{
|
||||
return is_boundary_point(pt);
|
||||
}
|
||||
|
||||
template <boundary_query BoundaryQuery>
|
||||
bool is_boundary(point_type const& pt, segment_identifier const& sid)
|
||||
bool is_boundary(point_type const& pt, segment_identifier const& sid) const
|
||||
{
|
||||
if ( BoundaryQuery == boundary_front )
|
||||
{
|
||||
@@ -129,7 +129,7 @@ public:
|
||||
private:
|
||||
// First call O(NlogN)
|
||||
// Each next call O(logN)
|
||||
bool is_boundary_point(point_type const& pt)
|
||||
bool is_boundary_point(point_type const& pt) const
|
||||
{
|
||||
typedef typename boost::range_size<Geometry>::type size_type;
|
||||
size_type multi_count = boost::size(geometry);
|
||||
@@ -174,9 +174,10 @@ private:
|
||||
return equal_points_count % 2 != 0;// && equal_points_count > 0; // the number is odd and > 0
|
||||
}
|
||||
|
||||
bool is_filled;
|
||||
mutable bool is_filled;
|
||||
// TODO: store references/pointers instead of points?
|
||||
std::vector<point_type> boundary_points;
|
||||
mutable std::vector<point_type> boundary_points;
|
||||
|
||||
Geometry const& geometry;
|
||||
};
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ class no_turns_la_linestring_pred
|
||||
public:
|
||||
no_turns_la_linestring_pred(Geometry2 const& geometry2,
|
||||
Result & res,
|
||||
BoundaryChecker & boundary_checker)
|
||||
BoundaryChecker const& boundary_checker)
|
||||
: m_geometry2(geometry2)
|
||||
, m_result_ptr(boost::addressof(res))
|
||||
, m_boundary_checker_ptr(boost::addressof(boundary_checker))
|
||||
@@ -96,7 +96,7 @@ public:
|
||||
private:
|
||||
Geometry2 const& m_geometry2;
|
||||
Result * m_result_ptr;
|
||||
BoundaryChecker * m_boundary_checker_ptr;
|
||||
const BoundaryChecker * m_boundary_checker_ptr;
|
||||
unsigned m_interrupt_flags;
|
||||
};
|
||||
|
||||
@@ -223,7 +223,7 @@ static const bool reverse2 = detail::overlay::do_reverse<geometry::point_order<G
|
||||
TurnIt first, TurnIt it, TurnIt last,
|
||||
Geometry const& geometry,
|
||||
OtherGeometry const& other_geometry,
|
||||
BoundaryChecker & boundary_checker)
|
||||
BoundaryChecker const& boundary_checker)
|
||||
{
|
||||
if ( it != last )
|
||||
{
|
||||
@@ -630,7 +630,7 @@ static const bool reverse2 = detail::overlay::do_reverse<geometry::point_order<G
|
||||
TurnIt first, TurnIt last,
|
||||
Geometry const& geometry,
|
||||
OtherGeometry const& other_geometry,
|
||||
BoundaryChecker & boundary_checker)
|
||||
BoundaryChecker const& boundary_checker)
|
||||
{
|
||||
if ( first == last )
|
||||
return;
|
||||
|
||||
@@ -33,7 +33,7 @@ class disjoint_linestring_pred
|
||||
{
|
||||
public:
|
||||
disjoint_linestring_pred(Result & res,
|
||||
BoundaryChecker & boundary_checker)
|
||||
BoundaryChecker const& boundary_checker)
|
||||
: m_result_ptr(boost::addressof(res))
|
||||
, m_boundary_checker_ptr(boost::addressof(boundary_checker))
|
||||
{}
|
||||
@@ -69,7 +69,7 @@ public:
|
||||
|
||||
private:
|
||||
Result * m_result_ptr;
|
||||
BoundaryChecker * m_boundary_checker_ptr;
|
||||
const BoundaryChecker * m_boundary_checker_ptr;
|
||||
};
|
||||
|
||||
//enum linestring_kind { linestring_exterior, linestring_point, linestring_closed, linestring_open };
|
||||
@@ -289,8 +289,8 @@ struct linear_linear
|
||||
TurnIt first, TurnIt it, TurnIt last,
|
||||
Geometry const& geometry,
|
||||
OtherGeometry const& other_geometry,
|
||||
BoundaryChecker & boundary_checker,
|
||||
OtherBoundaryChecker & other_boundary_checker)
|
||||
BoundaryChecker const& boundary_checker,
|
||||
OtherBoundaryChecker const& other_boundary_checker)
|
||||
{
|
||||
if ( it != last )
|
||||
{
|
||||
@@ -601,8 +601,8 @@ struct linear_linear
|
||||
TurnIt first, TurnIt last,
|
||||
Geometry const& geometry,
|
||||
OtherGeometry const& other_geometry,
|
||||
BoundaryChecker & boundary_checker,
|
||||
OtherBoundaryChecker & other_boundary_checker)
|
||||
BoundaryChecker const& boundary_checker,
|
||||
OtherBoundaryChecker const& other_boundary_checker)
|
||||
{
|
||||
if ( first == last )
|
||||
return;
|
||||
|
||||
@@ -670,7 +670,7 @@ public:
|
||||
|
||||
bool interrupt;
|
||||
|
||||
inline static_mask_handler()
|
||||
inline static_mask_handler(StaticMask const& /*dummy*/)
|
||||
: interrupt(false)
|
||||
{}
|
||||
|
||||
@@ -689,7 +689,7 @@ public:
|
||||
: should_handle ? 1
|
||||
: 2;
|
||||
|
||||
set_dispatch<F1, F2, V>(integral_constant<bool, interrupt_c>());
|
||||
set_dispatch<F1, F2, V>(integral_constant<int, version>());
|
||||
}
|
||||
|
||||
template <field F1, field F2, char V>
|
||||
|
||||
Reference in New Issue
Block a user