From 8ebe5ed74a530b83e958edaa7912e5ca81df01d1 Mon Sep 17 00:00:00 2001 From: cirdan Date: Fri, 31 Jan 2014 10:34:17 +0100 Subject: [PATCH] Remove CYapfShipT template parameter Tpf Template parameter Tpf is not really required, so get rid of it. This reduces the number of specialisations of CYapfShipT that are required. --- src/pathfinder/yapf/yapf_ship.cpp | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/pathfinder/yapf/yapf_ship.cpp b/src/pathfinder/yapf/yapf_ship.cpp index 3080e6855..8e1c8476a 100644 --- a/src/pathfinder/yapf/yapf_ship.cpp +++ b/src/pathfinder/yapf/yapf_ship.cpp @@ -16,7 +16,7 @@ #include "yapf_node_ship.hpp" /** YAPF class for ships */ -template +template class CYapfShipT : public TAstar { public: @@ -104,7 +104,7 @@ public: /** Call the node follower */ - static inline void Follow (Tpf *pf, Node *n) + static inline void Follow (CYapfShipT *pf, Node *n) { pf->Follow(n); } @@ -141,31 +141,28 @@ public: }; /* YAPF type 1 - uses TileIndex/Trackdir as Node key, allows 90-deg turns */ -struct CYapfShip1 - : CYapfShipT +struct CYapfShip1 : CYapfShipT { CYapfShip1 (const Ship *ship) - : CYapfShipT (ship, true) + : CYapfShipT (ship, true) { } }; /* YAPF type 2 - uses TileIndex/DiagDirection as Node key, allows 90-deg turns */ -struct CYapfShip2 - : CYapfShipT +struct CYapfShip2 : CYapfShipT { CYapfShip2 (const Ship *ship) - : CYapfShipT (ship, true) + : CYapfShipT (ship, true) { } }; /* YAPF type 3 - uses TileIndex/Trackdir as Node key, forbids 90-deg turns */ -struct CYapfShip3 - : CYapfShipT +struct CYapfShip3 : CYapfShipT { CYapfShip3 (const Ship *ship) - : CYapfShipT (ship, false) + : CYapfShipT (ship, false) { } }; -- 2.11.4.GIT