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

send preceding node if it's 0

parent dbc00a67
No related branches found
No related tags found
1 merge request!1Transit algorithm implementation
...@@ -43,7 +43,7 @@ public: ...@@ -43,7 +43,7 @@ public:
*/ */
[[nodiscard]] int getPrecedingNodeIndex() const [[nodiscard]] int getPrecedingNodeIndex() const
{ {
if(_stopIndex - 1 > 0) if(_stopIndex - 1 >= 0)
return _lineRef.getNode(_stopIndex - 1); return _lineRef.getNode(_stopIndex - 1);
else else
return -1; return -1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment