1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-23 04:04:09 +01:00

Fix bff8501: Gcc 15 warns about duplicate type. (#14660)

This commit is contained in:
Kuhnovic
2025-09-26 10:04:50 +02:00
committed by GitHub
parent 80e58e751a
commit 6401855842
2 changed files with 6 additions and 6 deletions

View File

@@ -22,7 +22,7 @@ struct YapfRiverBuilderNode : CYapfNodeT<CYapfNodeKeyTrackDir, YapfRiverBuilderN
using RiverBuilderNodeList = NodeList<YapfRiverBuilderNode, 8, 10>;
/* We don't need a follower but YAPF requires one. */
struct DummyFollower {};
struct RiverBuilderFollower {};
/* We don't need a vehicle but YAPF requires one. */
struct DummyVehicle : Vehicle {};
@@ -32,7 +32,7 @@ class YapfRiverBuilder;
/* Types struct required for YAPF components. */
struct RiverBuilderTypes {
using Tpf = YapfRiverBuilder;
using TrackFollower = DummyFollower;
using TrackFollower = RiverBuilderFollower;
using NodeList = RiverBuilderNodeList;
using VehicleType = DummyVehicle;
};
@@ -74,7 +74,7 @@ public:
return n.GetTile() == this->end_tile;
}
inline bool PfCalcCost(Node &n, const DummyFollower *)
inline bool PfCalcCost(Node &n, const RiverBuilderFollower *)
{
n.cost = n.parent->cost + 1 + RandomRange(_settings_game.game_creation.river_route_random);
return true;
@@ -94,7 +94,7 @@ public:
if (IsValidTile(t) && RiverFlowsDown(old_node.GetTile(), t)) {
Node &node = Yapf().CreateNewNode();
node.Set(&old_node, t, INVALID_TRACKDIR, true);
Yapf().AddNewNode(node, DummyFollower{});
Yapf().AddNewNode(node, RiverBuilderFollower{});
}
}
}

View File

@@ -76,14 +76,14 @@ struct WaterRegionNode : CYapfNodeT<WaterRegionPatchKey, WaterRegionNode> {
using WaterRegionNodeList = NodeList<WaterRegionNode, NODE_LIST_HASH_BITS_OPEN, NODE_LIST_HASH_BITS_CLOSED>;
/* We don't need a follower but YAPF requires one. */
struct DummyFollower : public CFollowTrackWater {};
struct WaterRegionFollower : public CFollowTrackWater {};
class YapfShipRegions;
/* Types struct required for YAPF internals. */
struct WaterRegionTypes {
using Tpf = YapfShipRegions;
using TrackFollower = DummyFollower;
using TrackFollower = WaterRegionFollower;
using NodeList = WaterRegionNodeList;
using VehicleType = Ship;
};