From f3f54c65a83c24cca384da4d92468082cb5a68c6 Mon Sep 17 00:00:00 2001 From: Romain BERNARD <romain.bernard@uca.fr> Date: Tue, 27 Feb 2024 18:51:59 +0100 Subject: [PATCH] fix line change conditional --- src/ShortestPath/Transit/TransitShortestPathPrecompute.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ShortestPath/Transit/TransitShortestPathPrecompute.cpp b/src/ShortestPath/Transit/TransitShortestPathPrecompute.cpp index d4936f3..1eaffda 100644 --- a/src/ShortestPath/Transit/TransitShortestPathPrecompute.cpp +++ b/src/ShortestPath/Transit/TransitShortestPathPrecompute.cpp @@ -33,8 +33,8 @@ TransitStateContainer TransitShortestPathPrecompute::executeAlgorithm(const Grap //If there is a proper next node and if it's not the same as our last used line stop predecessor if(nextNode != -1 && (currentState.getConnections().empty() || nextNode != currentState.getConnections().back().getPrecedingNodeIndex())) { TransitAlgorithmState newState; //define variable before conditionals - if(currentState.getConnections().empty() || currentState.getConnections().back().getLineRef() != lineStop.getLineRef() - && currentState.getConnections().size() < 2) // if new line is different than current line + if(currentState.getConnections().empty() || (currentState.getConnections().back().getLineRef() != lineStop.getLineRef() + && currentState.getConnections().size() < 2)) // if new line is different than current line { newState = TransitAlgorithmState(currentState, lineStop); newState.setNodeIndex(nextNode); -- GitLab