diff --git a/include/boost/geometry/algorithms/detail/relate/boundary_checker.hpp b/include/boost/geometry/algorithms/detail/relate/boundary_checker.hpp index da0705214..b16e6bae6 100644 --- a/include/boost/geometry/algorithms/detail/relate/boundary_checker.hpp +++ b/include/boost/geometry/algorithms/detail/relate/boundary_checker.hpp @@ -96,13 +96,13 @@ public: {} template - bool is_endpoint_boundary(point_type const& pt) + bool is_endpoint_boundary(point_type const& pt) const { return is_boundary_point(pt); } template - 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::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 boundary_points; + mutable std::vector boundary_points; + Geometry const& geometry; }; diff --git a/include/boost/geometry/algorithms/detail/relate/linear_areal.hpp b/include/boost/geometry/algorithms/detail/relate/linear_areal.hpp index 9aa73e2e6..15c5b23ec 100644 --- a/include/boost/geometry/algorithms/detail/relate/linear_areal.hpp +++ b/include/boost/geometry/algorithms/detail/relate/linear_areal.hpp @@ -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(integral_constant()); + set_dispatch(integral_constant()); } template