From 862ec14e06751ba674ae8e8cbfcdddd81eabd4f9 Mon Sep 17 00:00:00 2001 From: "Daniel J. Hofmann" Date: Wed, 10 May 2017 15:07:14 +0200 Subject: [PATCH] Asserts Valid Iterators in Roundabout Exit Invalidation, see #4024 --- src/extractor/guidance/roundabout_handler.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/extractor/guidance/roundabout_handler.cpp b/src/extractor/guidance/roundabout_handler.cpp index 6095d405b..d1deba7cb 100644 --- a/src/extractor/guidance/roundabout_handler.cpp +++ b/src/extractor/guidance/roundabout_handler.cpp @@ -1,6 +1,7 @@ #include "extractor/guidance/roundabout_handler.hpp" #include "extractor/guidance/constants.hpp" +#include "util/assert.hpp" #include "util/bearing.hpp" #include "util/coordinate_calculation.hpp" #include "util/guidance/name_announcements.hpp" @@ -158,6 +159,8 @@ void RoundaboutHandler::invalidateExitAgainstDirection(const NodeID from_nid, } } + OSRM_ASSERT(invalidate_from <= invalidate_to, coordinates[from_nid]); + // Exiting roundabouts at an entry point is technically a data-modelling issue. // This workaround handles cases in which an exit precedes and entry. The resulting // u-turn against the roundabout direction is invalidated.