diff --git a/include/boost/geometry/algorithms/detail/overlay/follow_linear_linear.hpp b/include/boost/geometry/algorithms/detail/overlay/follow_linear_linear.hpp index eb34a592a..05cb930b8 100644 --- a/include/boost/geometry/algorithms/detail/overlay/follow_linear_linear.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/follow_linear_linear.hpp @@ -10,9 +10,28 @@ #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_FOLLOW_LINEAR_LINEAR_HPP #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_FOLLOW_LINEAR_LINEAR_HPP +#include +#include + +#include +#include + +#include +#include +#include + +#include #include +#include +#include +#include + #include +#include +#include + + namespace boost { namespace geometry { @@ -168,7 +187,6 @@ protected: bool& first, bool& entered, std::size_t& enter_count, Linestring const& linestring, - Linear const& /* linear */, LinestringOut& current_piece, SegmentIdentifier& current_segment_id, OutputIterator oit) @@ -292,7 +310,7 @@ public: oit = process_turn(it, op_it, first, entered, enter_count, - linestring, linear, + linestring, current_piece, current_segment_id, oit); } @@ -399,8 +417,6 @@ public: // Iterate through all intersection points (they are // ordered along the each line) - LinestringOut current_piece; - geometry::segment_identifier current_segment_id(0, -1, -1, -1); int current_multi_id = -1; turn_operation_iterator op_it = boost::begin(start->operations); @@ -411,7 +427,6 @@ public: oit); TurnIterator turns_begin = start, turns_end; - Linestring const* linestring; do { // find last turn with this multi-index turns_end = turns_begin; @@ -423,9 +438,9 @@ public: while ( turns_end != beyond && op_it->seg_id.multi_index == current_multi_id ); - linestring = &*(boost::begin(multilinestring) + current_multi_id); - - oit = Base::apply(*linestring, linear, turns_begin, turns_end, oit); + oit = Base::apply(*(boost::begin(multilinestring) + + current_multi_id), + linear, turns_begin, turns_end, oit); int new_multi_id(0); linestring_iterator ls_beyond_last = ls_end;