summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/waypoint.cpp2
-rw-r--r--src/waypoint.h5
2 files changed, 1 insertions, 6 deletions
diff --git a/src/waypoint.cpp b/src/waypoint.cpp
index 0916a887f..3d6ed983e 100644
--- a/src/waypoint.cpp
+++ b/src/waypoint.cpp
@@ -293,7 +293,7 @@ void WaypointsDailyLoop()
/* Check if we need to delete a waypoint */
FOR_ALL_WAYPOINTS(wp) {
- if (wp->deleted != 0 && --wp->deleted == 0) DeleteWaypoint(wp);
+ if (wp->deleted != 0 && --wp->deleted == 0) delete wp;
}
}
diff --git a/src/waypoint.h b/src/waypoint.h
index 22259de09..a0742940e 100644
--- a/src/waypoint.h
+++ b/src/waypoint.h
@@ -44,11 +44,6 @@ static inline bool IsValidWaypointID(WaypointID index)
return index < GetWaypointPoolSize() && GetWaypoint(index)->IsValid();
}
-static inline void DeleteWaypoint(Waypoint *wp)
-{
- wp->~Waypoint();
-}
-
#define FOR_ALL_WAYPOINTS_FROM(wp, start) for (wp = GetWaypoint(start); wp != NULL; wp = (wp->index + 1U < GetWaypointPoolSize()) ? GetWaypoint(wp->index + 1U) : NULL) if (wp->IsValid())
#define FOR_ALL_WAYPOINTS(wp) FOR_ALL_WAYPOINTS_FROM(wp, 0)