From c002ee258b21c2d04bfa73c94aeadce442b44989 Mon Sep 17 00:00:00 2001 From: tatiana-kondakova Date: Mon, 16 Oct 2017 17:35:29 +0300 Subject: [PATCH] Workaround to avoid invarian violation while transit section does not have weights. --- routing/transit_graph.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/routing/transit_graph.cpp b/routing/transit_graph.cpp index e1e7f9a81a..ec7e28f0a8 100644 --- a/routing/transit_graph.cpp +++ b/routing/transit_graph.cpp @@ -80,6 +80,7 @@ void TransitGraph::Fill(vector const & stops, vector const & stops, vector> ingoing; for (auto const & edge : edges) { + CHECK_NOT_EQUAL(edge.GetWeight(), transit::kInvalidWeight, ("Edge should have valid weight.")); AddEdge(edge, stopCoords); outgoing[edge.GetStop1Id()].insert(edge); ingoing[edge.GetStop2Id()].insert(edge);