diff --git a/include/boost/geometry/algorithms/detail/overlay/follow.hpp b/include/boost/geometry/algorithms/detail/overlay/follow.hpp index b110cc960..7106b9782 100644 --- a/include/boost/geometry/algorithms/detail/overlay/follow.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/follow.hpp @@ -61,7 +61,7 @@ static inline bool last_covered_by(Turn const& turn, Operation const& op, < point_type, 0, dimension::value - >::apply(point_in_between, linestring[op.seg_id.segment_index], turn.point); + >::apply(point_in_between, *(::boost::begin(linestring) + op.seg_id.segment_index), turn.point); return geometry::covered_by(point_in_between, polygon); } @@ -182,11 +182,13 @@ struct action_selector // and add the output piece geometry::copy_segments(linestring, segment_id, index, current_piece); detail::overlay::append_no_duplicates(current_piece, point); - if (current_piece.size() > 1) + if (::boost::size(current_piece) > 1) { *out++ = current_piece; } current_piece.clear(); + //traits::clear::apply(current_piece); + geometry::clear(current_piece); } static inline bool is_entered(bool entered)