From 6ad0230b50be3e867e4ea1a1e33fd30c7487ec4a Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Thu, 13 Oct 2022 20:34:25 +0100 Subject: Standard typedefs for Link --- game/vehicles/linkHistory.cpp | 2 +- game/vehicles/linkHistory.h | 6 +++--- game/vehicles/train.h | 2 +- game/vehicles/vehicle.cpp | 2 +- game/vehicles/vehicle.h | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) (limited to 'game/vehicles') diff --git a/game/vehicles/linkHistory.cpp b/game/vehicles/linkHistory.cpp index 4fac4ba..2802109 100644 --- a/game/vehicles/linkHistory.cpp +++ b/game/vehicles/linkHistory.cpp @@ -3,7 +3,7 @@ #include LinkHistory::Entry -LinkHistory::add(const LinkWPtr & l, unsigned char d) +LinkHistory::add(const Link::WPtr & l, unsigned char d) { links.insert(links.begin(), {l, d}); const auto lp = l.lock(); diff --git a/game/vehicles/linkHistory.h b/game/vehicles/linkHistory.h index 6944727..cc57fe0 100644 --- a/game/vehicles/linkHistory.h +++ b/game/vehicles/linkHistory.h @@ -6,9 +6,9 @@ class LinkHistory { public: - using WEntry = std::pair; - using Entry = std::pair; - Entry add(const LinkWPtr &, unsigned char); + using WEntry = std::pair; + using Entry = std::pair; + Entry add(const Link::WPtr &, unsigned char); [[nodiscard]] Entry getCurrent() const; [[nodiscard]] Entry getAt(float, float *) const; diff --git a/game/vehicles/train.h b/game/vehicles/train.h index 0c6a741..58e5e29 100644 --- a/game/vehicles/train.h +++ b/game/vehicles/train.h @@ -18,7 +18,7 @@ class Ray; class Train : public Vehicle, public Collection, public Can, public Can { public: - explicit Train(const LinkPtr & link, float linkDist = 0) : Vehicle {link, linkDist} { } + explicit Train(const Link::Ptr & link, float linkDist = 0) : Vehicle {link, linkDist} { } [[nodiscard]] const Location & getLocation() const override diff --git a/game/vehicles/vehicle.cpp b/game/vehicles/vehicle.cpp index 53450f6..6dc8371 100644 --- a/game/vehicles/vehicle.cpp +++ b/game/vehicles/vehicle.cpp @@ -15,7 +15,7 @@ #include #include -Vehicle::Vehicle(const LinkPtr & l, float ld) : linkDist {ld} +Vehicle::Vehicle(const Link::Ptr & l, float ld) : linkDist {ld} { linkHist.add(l, 0); currentActivity = std::make_unique(); diff --git a/game/vehicles/vehicle.h b/game/vehicles/vehicle.h index 24557b5..3fa3092 100644 --- a/game/vehicles/vehicle.h +++ b/game/vehicles/vehicle.h @@ -14,7 +14,7 @@ class Location; class Vehicle : public WorldObject, public Renderable, public Selectable { public: - explicit Vehicle(const LinkPtr & link, float linkDist = 0); + explicit Vehicle(const Link::Ptr & link, float linkDist = 0); float linkDist; // distance along current link float speed {}; // speed in m/s (~75 km/h) -- cgit v1.2.3