route return now the real last element of the list
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user