[traverse] add is_visited is separate method to later tweak this behaviour

This commit is contained in:
Barend Gehrels
2016-04-06 09:55:38 +02:00
parent 558e69d717
commit c8fd07fd6f

View File

@@ -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;
}