From 5df8419a8339990ff44c62943ed150e3620a4d4a Mon Sep 17 00:00:00 2001
From: Romain BERNARD <romain.bernard@uca.fr>
Date: Tue, 27 Feb 2024 18:52:24 +0100
Subject: [PATCH] fix state = operator to properly clear connections list

---
 src/ShortestPath/Transit/TransitAlgorithmState.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/ShortestPath/Transit/TransitAlgorithmState.h b/src/ShortestPath/Transit/TransitAlgorithmState.h
index 0b44eee..bd06b32 100644
--- a/src/ShortestPath/Transit/TransitAlgorithmState.h
+++ b/src/ShortestPath/Transit/TransitAlgorithmState.h
@@ -143,6 +143,7 @@ public:
         _instant = baseState.getInstant();
         _passageIndex = baseState.getPassageIndex();
         //Copy old connections
+        _connections.clear(); //TODO: see with HT if there's a better way to do this for an assignment operator
         for(auto& lineStop : baseState.getConnections()) {
             _connections.emplace_back(lineStop);
         }
-- 
GitLab