route return now the real last element of the list

This commit is contained in:
2023-05-24 14:42:15 +02:00
parent 56f506e1b5
commit 52590e9e2f
+4 -3
View File
@@ -148,15 +148,16 @@ Point Route::getNextPoint() {
if (!this->started)
return Point();
if (this->it != this->points.end()) {
if (this->it != --this->points.end()) {
this->it++;
this->currentPoint++;
return *this->it;
// } else if (this->it == this->points.end() && this->currentPoint != this->points.size()) {
// this->currentPoint++;
// return *this->it;
} else
return Point();
}
return Point();
}
Point Route::getPreviousPoint() {