summaryrefslogtreecommitdiff
path: root/src/waypoint_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/waypoint_cmd.cpp')
-rw-r--r--src/waypoint_cmd.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/waypoint_cmd.cpp b/src/waypoint_cmd.cpp
index 724f193af..c7095673a 100644
--- a/src/waypoint_cmd.cpp
+++ b/src/waypoint_cmd.cpp
@@ -406,13 +406,7 @@ CommandCost CmdRenameWaypoint(TileIndex tile, DoCommandFlag flags, uint32 p1, ui
if (flags & DC_EXEC) {
free(wp->name);
-
- if (reset) {
- wp->name = NULL;
- MakeDefaultName(wp);
- } else {
- wp->name = strdup(text);
- }
+ wp->name = reset ? NULL : strdup(text);
wp->UpdateVirtCoord();
}