From a5d8aa0351811a54b74a49ef01f1fc9ee4f46b3b Mon Sep 17 00:00:00 2001 From: Nick Gasson Date: Tue, 16 Mar 2010 08:31:05 +0000 Subject: [PATCH] Make IRollingStock::length return a float --- include/IRollingStock.hpp | 2 +- src/Engine.cpp | 2 +- src/Waggon.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/IRollingStock.hpp b/include/IRollingStock.hpp index a76bd57..a8c755f 100644 --- a/include/IRollingStock.hpp +++ b/include/IRollingStock.hpp @@ -39,7 +39,7 @@ struct IRollingStock { virtual double speed() const = 0; // Return the length of the vehicle in game units - virtual double length() const = 0; + virtual float length() const = 0; }; typedef shared_ptr IRollingStockPtr; diff --git a/src/Engine.cpp b/src/Engine.cpp index a16cdb7..ce13a4e 100644 --- a/src/Engine.cpp +++ b/src/Engine.cpp @@ -68,7 +68,7 @@ public: double speed() const { return mySpeed; } IControllerPtr controller() { return shared_from_this(); } - double length() const { return model->dimensions().x; } + float length() const { return model->dimensions().x; } // IController interface void actOn(Action anAction); diff --git a/src/Waggon.cpp b/src/Waggon.cpp index c56d5cd..176e07c 100644 --- a/src/Waggon.cpp +++ b/src/Waggon.cpp @@ -37,7 +37,7 @@ public: void render() const; IControllerPtr controller(); double speed() const { return 0.0; } - double length() const { return model->dimensions().x; } + float length() const { return model->dimensions().x; } // IXMLCallback interface void text(const string& localName, const string& aString); -- 2.39.2