From 02f1bc0880f000c8c2a2d223107a6de28fe6cd78 Mon Sep 17 00:00:00 2001 From: Rubidium Date: Sun, 9 Mar 2025 08:55:35 +0100 Subject: [PATCH] Codefix: remove some logically dead code --- src/pathfinder/yapf/yapf_ship.cpp | 2 +- src/road_cmd.cpp | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/pathfinder/yapf/yapf_ship.cpp b/src/pathfinder/yapf/yapf_ship.cpp index 4552c0141b..6a34d5dc89 100644 --- a/src/pathfinder/yapf/yapf_ship.cpp +++ b/src/pathfinder/yapf/yapf_ship.cpp @@ -289,7 +289,7 @@ public: return result; } - return INVALID_TRACKDIR; + NOT_REACHED(); } /** diff --git a/src/road_cmd.cpp b/src/road_cmd.cpp index 73dd252cb6..a804e84570 100644 --- a/src/road_cmd.cpp +++ b/src/road_cmd.cpp @@ -657,8 +657,6 @@ CommandCost CmdBuildRoad(DoCommandFlags flags, TileIndex tile, RoadBits pieces, if ((existing & pieces) == pieces) { /* We only want to set the (dis)allowed road directions */ if (toggle_drd != DRD_NONE && rtt == RTT_ROAD) { - if (crossing) return CommandCost(STR_ERROR_ONEWAY_ROADS_CAN_T_HAVE_JUNCTION); - Owner owner = GetRoadOwner(tile, rtt); if (owner != OWNER_NONE) { CommandCost ret = CheckOwnership(owner, tile);