From c8fd07fd6ff1665b2d84292d4f4841f08b37853d Mon Sep 17 00:00:00 2001 From: Barend Gehrels Date: Wed, 6 Apr 2016 09:55:38 +0200 Subject: [PATCH] [traverse] add is_visited is separate method to later tweak this behaviour --- .../geometry/algorithms/detail/overlay/traverse.hpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/include/boost/geometry/algorithms/detail/overlay/traverse.hpp b/include/boost/geometry/algorithms/detail/overlay/traverse.hpp index 370c0d3a2..e5845ffe9 100644 --- a/include/boost/geometry/algorithms/detail/overlay/traverse.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/traverse.hpp @@ -159,6 +159,12 @@ struct traversal } } + inline bool is_visited(turn_type const& turn, turn_operation_type const& op, + signed_size_type turn_index, int op_index) const + { + return op.visited.visited(); + } + inline bool select_source(signed_size_type turn_index, segment_identifier const& seg_id1, segment_identifier const& seg_id2) @@ -598,7 +604,8 @@ struct traversal } turn_operation_type& op = current_turn.operations[op_index]; - if (op.visited.finalized() || op.visited.visited()) + if (op.visited.finalized() + || is_visited(current_turn, op, turn_index, op_index)) { return traverse_error_visit_again; }