Skip to content
Snippets Groups Projects
Commit 5df8419a authored by Romain BERNARD's avatar Romain BERNARD
Browse files

fix state = operator to properly clear connections list

parent f3f54c65
Branches
No related tags found
1 merge request!1Transit algorithm implementation
...@@ -143,6 +143,7 @@ public: ...@@ -143,6 +143,7 @@ public:
_instant = baseState.getInstant(); _instant = baseState.getInstant();
_passageIndex = baseState.getPassageIndex(); _passageIndex = baseState.getPassageIndex();
//Copy old connections //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()) { for(auto& lineStop : baseState.getConnections()) {
_connections.emplace_back(lineStop); _connections.emplace_back(lineStop);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment