From e5476c56e0d12a0e7dd96e83422213896ec0988c Mon Sep 17 00:00:00 2001 From: Nick Gasson Date: Fri, 5 Jun 2009 21:06:48 +0100 Subject: [PATCH] Go back to using standard C++03 --- CMakeLists.txt | 2 +- include/IBillboard.hpp | 4 +-- include/IController.hpp | 4 +-- include/IFog.hpp | 4 +-- include/IGraphics.hpp | 4 +-- include/ILogger.hpp | 6 ++--- include/IMap.hpp | 2 +- include/IMesh.hpp | 10 +++---- include/IModel.hpp | 4 +-- include/IPickBuffer.hpp | 4 +-- include/IQuadTree.hpp | 6 ++--- include/IRollingStock.hpp | 4 +-- include/IScreen.hpp | 4 +-- include/ISmokeTrail.hpp | 4 +-- include/IStation.hpp | 4 +-- include/ITrackSegment.hpp | 10 +++---- include/ITrain.hpp | 4 +-- include/IWindow.hpp | 4 +-- include/gui/IContainer.hpp | 4 +-- include/gui/IControl.hpp | 17 ++++++------ include/gui/IFont.hpp | 4 +-- include/gui/Internal.hpp | 53 +++++++++++++++++++++++++++++++------- src/CrossoverTrack.cpp | 3 ++- src/CurvedTrack.cpp | 3 ++- src/Editor.cpp | 1 + src/Engine.cpp | 2 +- src/Game.cpp | 1 + src/Map.cpp | 3 ++- src/Mesh.cpp | 7 ++--- src/Model.cpp | 1 + src/SDLWindow.cpp | 1 + src/SmokeTrail.cpp | 3 ++- src/StraightTrack.cpp | 3 ++- src/TrackCommon.cpp | 1 + src/Train.cpp | 1 + src/gui/Button.cpp | 2 +- src/gui/FlowBox.cpp | 3 ++- src/gui/FuelMeter.cpp | 3 ++- src/gui/Label.cpp | 2 +- src/gui/ThrottleMeter.cpp | 2 +- 40 files changed, 127 insertions(+), 77 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f65bc7a..11e7d56 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,7 +39,7 @@ include_directories (include ${XERCES_INCLUDE_DIRS}) include_directories (include ${FREETYPE_INCLUDE_DIRS}) if (NOT WIN32) # Unix - add_definitions ("-Wall -std=c++0x") + add_definitions ("-Wall") endif (NOT WIN32) diff --git a/include/IBillboard.hpp b/include/IBillboard.hpp index 1aecb93..d1b919c 100644 --- a/include/IBillboard.hpp +++ b/include/IBillboard.hpp @@ -21,7 +21,7 @@ #include "ITexture.hpp" #include "Maths.hpp" -#include +#include // Generic quad billboard with a single texture struct IBillboard { @@ -34,7 +34,7 @@ struct IBillboard { virtual void setColour(float r, float g, float b, float a) = 0; }; -typedef std::shared_ptr IBillboardPtr; +typedef std::tr1::shared_ptr IBillboardPtr; IBillboardPtr makeCylindricalBillboard(ITexturePtr aTexture); IBillboardPtr makeSphericalBillboard(ITexturePtr aTexture); diff --git a/include/IController.hpp b/include/IController.hpp index 8b4e520..b41bcc9 100644 --- a/include/IController.hpp +++ b/include/IController.hpp @@ -18,7 +18,7 @@ #ifndef INC_ICONTROLLER_HPP #define INC_ICONTROLLER_HPP -#include +#include // Actions the user can send enum Action { @@ -41,6 +41,6 @@ struct IController { virtual double temp() const = 0; }; -typedef std::shared_ptr IControllerPtr; +typedef std::tr1::shared_ptr IControllerPtr; #endif diff --git a/include/IFog.hpp b/include/IFog.hpp index 6a41b30..55b7e9e 100644 --- a/include/IFog.hpp +++ b/include/IFog.hpp @@ -18,7 +18,7 @@ #ifndef INC_ILIGHT_HPP #define INC_ILIGHT_HPP -#include +#include // Interface to OpenGL fog effects struct IFog { @@ -27,7 +27,7 @@ struct IFog { virtual void apply() const = 0; }; -typedef std::shared_ptr IFogPtr; +typedef std::tr1::shared_ptr IFogPtr; // Construct a generic fog IFogPtr makeFog(float r, float g, float b, diff --git a/include/IGraphics.hpp b/include/IGraphics.hpp index 49c14bf..46f855a 100644 --- a/include/IGraphics.hpp +++ b/include/IGraphics.hpp @@ -20,7 +20,7 @@ #include "Maths.hpp" -#include +#include // Interface to stateful graphics things (lights, cameras, etc.) struct IGraphics { @@ -38,6 +38,6 @@ struct IGraphics { const Vector aTargetPoint) = 0; }; -typedef std::shared_ptr IGraphicsPtr; +typedef std::tr1::shared_ptr IGraphicsPtr; #endif diff --git a/include/ILogger.hpp b/include/ILogger.hpp index dac5808..8ed3f12 100644 --- a/include/ILogger.hpp +++ b/include/ILogger.hpp @@ -18,7 +18,7 @@ #ifndef INC_ILOGGER_HPP #define INC_ILOGGER_HPP -#include +#include #include // Stream surrogate for writing log data to @@ -28,7 +28,7 @@ struct PrintLine { std::ostream& stream; }; -typedef std::shared_ptr PrintLinePtr; +typedef std::tr1::shared_ptr PrintLinePtr; template inline PrintLinePtr operator<<(PrintLinePtr aPrintLine, const T& aThing) @@ -52,7 +52,7 @@ struct ILogger { virtual PrintLinePtr writeMsg(LogMsg::Type type = LogMsg::NORMAL) = 0; }; -typedef std::shared_ptr ILoggerPtr; +typedef std::tr1::shared_ptr ILoggerPtr; ILoggerPtr getLogger(); diff --git a/include/IMap.hpp b/include/IMap.hpp index 03af84c..bc86621 100644 --- a/include/IMap.hpp +++ b/include/IMap.hpp @@ -93,7 +93,7 @@ public: }; -typedef std::shared_ptr IMapPtr; +typedef std::tr1::shared_ptr IMapPtr; // Make an empty map IMapPtr makeEmptyMap(int aWidth, int aHeight); diff --git a/include/IMesh.hpp b/include/IMesh.hpp index e225136..707b66d 100644 --- a/include/IMesh.hpp +++ b/include/IMesh.hpp @@ -18,8 +18,8 @@ #ifndef INC_IMESH_HPP #define INC_IMESH_HPP -#include -#include +#include +#include #include "Maths.hpp" #include "ITexture.hpp" @@ -41,7 +41,7 @@ struct IMeshBuffer { typedef Vector Vertex; typedef Vector Normal; typedef Point TexCoord; - typedef std::tuple Colour; + typedef std::tr1::tuple Colour; typedef unsigned Index; virtual ~IMeshBuffer() {} @@ -64,7 +64,7 @@ struct IMeshBuffer { virtual void printStats() const = 0; }; -typedef std::shared_ptr IMeshBufferPtr; +typedef std::tr1::shared_ptr IMeshBufferPtr; // Generic interface to meshes struct IMesh { @@ -73,7 +73,7 @@ struct IMesh { virtual void render() const = 0; }; -typedef std::shared_ptr IMeshPtr; +typedef std::tr1::shared_ptr IMeshPtr; IMeshPtr makeMesh(IMeshBufferPtr aBuffer); IMeshBufferPtr makeMeshBuffer(); diff --git a/include/IModel.hpp b/include/IModel.hpp index 9f26ce0..13c78bc 100644 --- a/include/IModel.hpp +++ b/include/IModel.hpp @@ -20,7 +20,7 @@ #include "Maths.hpp" -#include +#include #include struct IModel { @@ -30,7 +30,7 @@ struct IModel { virtual Vector dimensions() const = 0; }; -typedef std::shared_ptr IModelPtr; +typedef std::tr1::shared_ptr IModelPtr; // Load a model from a WaveFront .obj file IModelPtr loadModel(const std::string& fileName, double aScale = 1.0); diff --git a/include/IPickBuffer.hpp b/include/IPickBuffer.hpp index f0e2329..16f204d 100644 --- a/include/IPickBuffer.hpp +++ b/include/IPickBuffer.hpp @@ -20,7 +20,7 @@ #include "IGraphics.hpp" -#include +#include // Provides access to a pick buffer for selecting objects struct IPickBuffer { @@ -30,6 +30,6 @@ struct IPickBuffer { virtual unsigned endPick() = 0; }; -typedef std::shared_ptr IPickBufferPtr; +typedef std::tr1::shared_ptr IPickBufferPtr; #endif diff --git a/include/IQuadTree.hpp b/include/IQuadTree.hpp index 2923dfb..91cac65 100644 --- a/include/IQuadTree.hpp +++ b/include/IQuadTree.hpp @@ -21,7 +21,7 @@ #include "Maths.hpp" #include "IGraphics.hpp" -#include +#include // Interface to things that can be rendered by sector struct ISectorRenderable { @@ -33,7 +33,7 @@ struct ISectorRenderable { Point botLeft, Point topRight) = 0; }; -typedef std::shared_ptr ISectorRenderablePtr; +typedef std::tr1::shared_ptr ISectorRenderablePtr; // Inteface for constructing quad trees for space partioning struct IQuadTree { @@ -42,7 +42,7 @@ struct IQuadTree { virtual void render(IGraphicsPtr aContext) = 0; }; -typedef std::shared_ptr IQuadTreePtr; +typedef std::tr1::shared_ptr IQuadTreePtr; // Produce a quad tree of given square dimension IQuadTreePtr makeQuadTree(ISectorRenderablePtr aRenderable, int aDim); diff --git a/include/IRollingStock.hpp b/include/IRollingStock.hpp index 366b7d8..191e66d 100644 --- a/include/IRollingStock.hpp +++ b/include/IRollingStock.hpp @@ -21,7 +21,7 @@ #include "IController.hpp" #include "Maths.hpp" -#include +#include // Interface for various powered and unpowered parts of the train struct IRollingStock { @@ -43,7 +43,7 @@ struct IRollingStock { virtual double length() const = 0; }; -typedef std::shared_ptr IRollingStockPtr; +typedef std::tr1::shared_ptr IRollingStockPtr; // Make various waggons and engines IRollingStockPtr makeEngine(); diff --git a/include/IScreen.hpp b/include/IScreen.hpp index 00eea9a..8177060 100644 --- a/include/IScreen.hpp +++ b/include/IScreen.hpp @@ -21,7 +21,7 @@ #include "IGraphics.hpp" #include "IPickBuffer.hpp" -#include +#include #include @@ -54,6 +54,6 @@ struct IScreen { MouseButton aButton) = 0; }; -typedef std::shared_ptr IScreenPtr; +typedef std::tr1::shared_ptr IScreenPtr; #endif diff --git a/include/ISmokeTrail.hpp b/include/ISmokeTrail.hpp index 39d4141..33b654c 100644 --- a/include/ISmokeTrail.hpp +++ b/include/ISmokeTrail.hpp @@ -18,7 +18,7 @@ #ifndef INC_ISMOKE_TRAIL_HPP #define INC_ISMOKE_TRAIL_HPP -#include +#include // Smoke and steam effects struct ISmokeTrail { @@ -41,7 +41,7 @@ struct ISmokeTrail { virtual void setDelay(int aDelay) = 0; }; -typedef std::shared_ptr ISmokeTrailPtr; +typedef std::tr1::shared_ptr ISmokeTrailPtr; ISmokeTrailPtr makeSmokeTrail(); diff --git a/include/IStation.hpp b/include/IStation.hpp index 4697b13..aa8d825 100644 --- a/include/IStation.hpp +++ b/include/IStation.hpp @@ -18,7 +18,7 @@ #ifndef INC_ISTATION_HPP #define INC_ISTATION_HPP -#include +#include // The different types of cargo that may be carried enum Cargo { @@ -33,7 +33,7 @@ struct IStation { virtual ~IStation() {} }; -typedef std::shared_ptr IStationPtr; +typedef std::tr1::shared_ptr IStationPtr; IStationPtr makeStation(); diff --git a/include/ITrackSegment.hpp b/include/ITrackSegment.hpp index 7989a32..fa95cde 100644 --- a/include/ITrackSegment.hpp +++ b/include/ITrackSegment.hpp @@ -20,9 +20,9 @@ #include "Maths.hpp" -#include -#include -#include +#include +#include +#include #include namespace xml { @@ -52,14 +52,14 @@ namespace axis { } struct ITrackSegment; -typedef std::shared_ptr ITrackSegmentPtr; +typedef std::tr1::shared_ptr ITrackSegmentPtr; // A segment of track which fits over a number of tiles // Each track segment has an origin and one or more exits struct ITrackSegment { virtual ~ITrackSegment() {} - typedef std::function TransformFunc; + typedef std::tr1::function TransformFunc; // Render the track with the origin in the centre virtual void render() const = 0; diff --git a/include/ITrain.hpp b/include/ITrain.hpp index 5bfa6f0..e025277 100644 --- a/include/ITrain.hpp +++ b/include/ITrain.hpp @@ -21,7 +21,7 @@ #include "IRollingStock.hpp" #include "IMap.hpp" -#include +#include // Interface to managing complete trains struct ITrain { @@ -41,7 +41,7 @@ struct ITrain { virtual IControllerPtr controller() = 0; }; -typedef std::shared_ptr ITrainPtr; +typedef std::tr1::shared_ptr ITrainPtr; ITrainPtr makeTrain(IMapPtr aMap); diff --git a/include/IWindow.hpp b/include/IWindow.hpp index dba18be..ff97d4e 100644 --- a/include/IWindow.hpp +++ b/include/IWindow.hpp @@ -1,7 +1,7 @@ #ifndef INC_IWINDOW_HPP #define INC_IWINDOW_HPP -#include +#include #include "IScreen.hpp" @@ -16,7 +16,7 @@ public: virtual void takeScreenShot() = 0; }; -typedef std::shared_ptr IWindowPtr; +typedef std::tr1::shared_ptr IWindowPtr; // Implementors IWindowPtr makeSDLWindow(); diff --git a/include/gui/IContainer.hpp b/include/gui/IContainer.hpp index 65792cf..052d162 100644 --- a/include/gui/IContainer.hpp +++ b/include/gui/IContainer.hpp @@ -20,7 +20,7 @@ #include "IControl.hpp" -#include +#include // GUI objects that contain other controls namespace gui { @@ -40,7 +40,7 @@ namespace gui { void origin(int& x, int& y) const; }; - typedef std::shared_ptr IContainerPtr; + typedef std::tr1::shared_ptr IContainerPtr; enum FlowBoxStyle { FLOW_BOX_HORIZ, FLOW_BOX_VERT diff --git a/include/gui/IControl.hpp b/include/gui/IControl.hpp index eab6713..553159d 100644 --- a/include/gui/IControl.hpp +++ b/include/gui/IControl.hpp @@ -20,15 +20,16 @@ #include "IFont.hpp" -#include -#include +#include +#include +#include #include #include namespace gui { - typedef std::tuple Colour; + typedef std::tr1::tuple Colour; // Interface to any UI control struct IControl { @@ -50,18 +51,18 @@ namespace gui { virtual bool handleMouseRelease(int x, int y) = 0; }; - typedef std::shared_ptr IControlPtr; + typedef std::tr1::shared_ptr IControlPtr; // Interface to clickable controls struct IButton : IControl { virtual ~IButton() {} - typedef std::function ClickHandler; + typedef std::tr1::function ClickHandler; virtual void onClick(ClickHandler aHandler) = 0; }; - typedef std::shared_ptr IButtonPtr; + typedef std::tr1::shared_ptr IButtonPtr; // Interface to a UI control that contains text struct ITextControl : IControl { @@ -73,7 +74,7 @@ namespace gui { virtual void setColour(float r, float g, float b) = 0; }; - typedef std::shared_ptr ITextControlPtr; + typedef std::tr1::shared_ptr ITextControlPtr; // Interface to controls that are progress meters, etc. struct IMeterControl : IControl { @@ -83,7 +84,7 @@ namespace gui { virtual void setRange(int aLowValue, int aHighValue) = 0; }; - typedef std::shared_ptr IMeterControlPtr; + typedef std::tr1::shared_ptr IMeterControlPtr; // Standard controls IButtonPtr makeButton(const std::string& aGlyphFile); diff --git a/include/gui/IFont.hpp b/include/gui/IFont.hpp index 672231a..41d670b 100644 --- a/include/gui/IFont.hpp +++ b/include/gui/IFont.hpp @@ -18,7 +18,7 @@ #ifndef INC_IFONT_HPP #define INC_IFONT_HPP -#include +#include #include namespace gui { @@ -34,7 +34,7 @@ namespace gui { virtual int maxHeight() const = 0; }; - typedef std::shared_ptr IFontPtr; + typedef std::tr1::shared_ptr IFontPtr; IFontPtr loadFont(const std::string& aFile, int aHeight, bool shadow=true); } diff --git a/include/gui/Internal.hpp b/include/gui/Internal.hpp index 8faa49e..7a7f58c 100644 --- a/include/gui/Internal.hpp +++ b/include/gui/Internal.hpp @@ -23,14 +23,29 @@ // Common implementation details for GUI components namespace gui { + // It would be nice if we could use variadic templates to + // implement variable-arity generic constructors but these + // are only supported in experimental GCC and not at all + // in Visual C++ + // Mixin to add hide/show ability template class Hideable : public Base { public: - template - Hideable(const Args&&... args) - : Base(args...), amVisible(true) {} + Hideable() : amVisible(true) {} + + template + Hideable(const A& a) + : Base(a), amVisible(true) {} + + template + Hideable(const A& a, const B& b) + : Base(a, b), amVisible(true) {} + template + Hideable(const A& a, const B& b, const C& c) + : Base(a, b, c), amVisible(true) {} + virtual ~Hideable() {} void setVisible(bool visible) @@ -51,10 +66,20 @@ namespace gui { template class Defaults : public Base { public: - template - Defaults(const Args&&... args) - : Base(args...) {} + Defaults() {} + + template + Defaults(const A& a) + : Base(a) {} + template + Defaults(const A& a, const B& b) + : Base(a, b) {} + + template + Defaults(const A& a, const B& b, const C& c) + : Base(a, b, c) {} + virtual ~Defaults() {} bool handleClick(int x, int y) { return false; } @@ -65,9 +90,19 @@ namespace gui { template class Moveable : public Base { public: - template - Moveable(const Args&&... args) - : Base(args...), myX(0), myY(0) {} + Moveable() : myX(0), myY(0) {} + + template + Moveable(const A& a) + : Base(a), myX(0), myY(0) {} + + template + Moveable(const A& a, const B& b) + : Base(a, b), myX(0), myY(0) {} + + template + Moveable(const A& a, const B& b, const C& c) + : Base(a, b, c), myX(0), myY(0) {} virtual ~Moveable() {} diff --git a/src/CrossoverTrack.cpp b/src/CrossoverTrack.cpp index de64325..b720ad5 100644 --- a/src/CrossoverTrack.cpp +++ b/src/CrossoverTrack.cpp @@ -27,7 +27,8 @@ #include using namespace std; -using namespace std::placeholders; +using namespace std::tr1; +using namespace std::tr1::placeholders; using namespace boost; // A section of track that allows travelling along both axis diff --git a/src/CurvedTrack.cpp b/src/CurvedTrack.cpp index 729eab7..32bb8f3 100644 --- a/src/CurvedTrack.cpp +++ b/src/CurvedTrack.cpp @@ -28,7 +28,8 @@ #include using namespace std; -using namespace std::placeholders; +using namespace std::tr1; +using namespace std::tr1::placeholders; using namespace track; using namespace boost; diff --git a/src/Editor.cpp b/src/Editor.cpp index 0c012e5..c2b0460 100644 --- a/src/Editor.cpp +++ b/src/Editor.cpp @@ -28,6 +28,7 @@ #include using namespace std; +using namespace std::tr1; using namespace gui; // Concrete editor class diff --git a/src/Engine.cpp b/src/Engine.cpp index ba4a729..0e450ec 100644 --- a/src/Engine.cpp +++ b/src/Engine.cpp @@ -57,7 +57,7 @@ using namespace std; // Concrete implementation of a steam engine class Engine : public IRollingStock, public IController, - public std::enable_shared_from_this { + public std::tr1::enable_shared_from_this { public: Engine(); diff --git a/src/Game.cpp b/src/Game.cpp index ecb2667..1a8e837 100644 --- a/src/Game.cpp +++ b/src/Game.cpp @@ -29,6 +29,7 @@ #include using namespace std; +using namespace std::tr1; using namespace gui; // Implementation of the main play screen diff --git a/src/Map.cpp b/src/Map.cpp index 26d4ceb..9cff636 100644 --- a/src/Map.cpp +++ b/src/Map.cpp @@ -30,12 +30,13 @@ #include #include #include -#include +#include #include #include using namespace std; +using namespace std::tr1; // A single piece of track may appear multiple times in the map - this // will be true for all track segments that cover multiple tiles diff --git a/src/Mesh.cpp b/src/Mesh.cpp index db3dd0b..f5913b7 100644 --- a/src/Mesh.cpp +++ b/src/Mesh.cpp @@ -28,6 +28,7 @@ #include using namespace std; +using namespace std::tr1; using namespace boost; // Concrete implementation of mesh buffers @@ -140,9 +141,9 @@ void MeshBuffer::add(const Vertex& aVertex, const Normal& aNormal, && mergeVector(aNormal, normals[*it])) { const Colour& other = colours[*it]; - if (abs(std::get<0>(other) - std::get<0>(aColour)) < 0.01f - && abs(std::get<1>(other) - std::get<1>(aColour)) < 0.01f - && abs(std::get<2>(other) - std::get<2>(aColour)) < 0.01f) { + if (abs(tr1::get<0>(other) - tr1::get<0>(aColour)) < 0.01f + && abs(tr1::get<1>(other) - tr1::get<1>(aColour)) < 0.01f + && abs(tr1::get<2>(other) - tr1::get<2>(aColour)) < 0.01f) { indices.push_back(*it); reused++; diff --git a/src/Model.cpp b/src/Model.cpp index 7f77b1c..2f23066 100644 --- a/src/Model.cpp +++ b/src/Model.cpp @@ -34,6 +34,7 @@ #include using namespace std; +using namespace std::tr1; using namespace boost; // Cache of already loaded models diff --git a/src/SDLWindow.cpp b/src/SDLWindow.cpp index f6b5402..6bf41d5 100644 --- a/src/SDLWindow.cpp +++ b/src/SDLWindow.cpp @@ -32,6 +32,7 @@ #include using namespace std; +using namespace std::tr1; using namespace boost; // Concrete implementation of SDL window diff --git a/src/SmokeTrail.cpp b/src/SmokeTrail.cpp index 9a919e6..a8c56eb 100644 --- a/src/SmokeTrail.cpp +++ b/src/SmokeTrail.cpp @@ -19,10 +19,11 @@ #include "IBillboard.hpp" #include -#include +#include #include using namespace std; +using namespace std::tr1; // Concrete implementation of smoke trails class SmokeTrail : public ISmokeTrail { diff --git a/src/StraightTrack.cpp b/src/StraightTrack.cpp index a84f980..59fb93f 100644 --- a/src/StraightTrack.cpp +++ b/src/StraightTrack.cpp @@ -28,7 +28,8 @@ #include using namespace std; -using namespace std::placeholders; +using namespace std::tr1; +using namespace std::tr1::placeholders; using namespace boost; using namespace track; diff --git a/src/TrackCommon.cpp b/src/TrackCommon.cpp index 4903b1e..b6c76c2 100644 --- a/src/TrackCommon.cpp +++ b/src/TrackCommon.cpp @@ -26,6 +26,7 @@ #include using namespace std; +using namespace std::tr1; namespace { const float RAIL_WIDTH = 0.05f; diff --git a/src/Train.cpp b/src/Train.cpp index 9558613..1845a4e 100644 --- a/src/Train.cpp +++ b/src/Train.cpp @@ -27,6 +27,7 @@ #include using namespace std; +using namespace std::tr1; // Concrete implementation of trains class Train : public ITrain { diff --git a/src/gui/Button.cpp b/src/gui/Button.cpp index dd3d799..fb1101a 100644 --- a/src/gui/Button.cpp +++ b/src/gui/Button.cpp @@ -101,6 +101,6 @@ bool Button::handleMouseRelease(int x, int y) IButtonPtr gui::makeButton(const string& aGlyphFile) { return IButtonPtr - (new Moveable>(aGlyphFile)); + (new Moveable >(aGlyphFile)); } diff --git a/src/gui/FlowBox.cpp b/src/gui/FlowBox.cpp index 9b3d809..ceb85a8 100644 --- a/src/gui/FlowBox.cpp +++ b/src/gui/FlowBox.cpp @@ -23,7 +23,8 @@ using namespace gui; using namespace std; -using namespace std::placeholders; +using namespace std::tr1; +using namespace std::tr1::placeholders; // A container which grows either horizontally or vertically as controls // are added diff --git a/src/gui/FuelMeter.cpp b/src/gui/FuelMeter.cpp index ae9afe6..f857568 100644 --- a/src/gui/FuelMeter.cpp +++ b/src/gui/FuelMeter.cpp @@ -25,6 +25,7 @@ using namespace gui; using namespace std; +using namespace std::tr1; using namespace boost; class FuelMeter : public IMeterControl { @@ -121,5 +122,5 @@ IMeterControlPtr gui::makeFuelMeter(IFontPtr aFont, const string& aCaption, const Colour& aColour) { return IMeterControlPtr - (new Defaults>>(aFont, aCaption, aColour)); + (new Defaults > >(aFont, aCaption, aColour)); } diff --git a/src/gui/Label.cpp b/src/gui/Label.cpp index 4dda25a..be9ed78 100644 --- a/src/gui/Label.cpp +++ b/src/gui/Label.cpp @@ -96,5 +96,5 @@ void Label::setText(const char* fmt, ...) ITextControlPtr gui::makeLabel(IFontPtr aFont, const std::string& aString) { return ITextControlPtr - (new Defaults>>(aFont, aString)); + (new Defaults > >(aFont, aString)); } diff --git a/src/gui/ThrottleMeter.cpp b/src/gui/ThrottleMeter.cpp index cdc60fb..d3b8cbf 100644 --- a/src/gui/ThrottleMeter.cpp +++ b/src/gui/ThrottleMeter.cpp @@ -137,5 +137,5 @@ void ThrottleMeter::render(int x, int y) const IMeterControlPtr gui::makeThrottleMeter(IFontPtr aFont) { return IMeterControlPtr - (new Defaults>>(aFont)); + (new Defaults > >(aFont)); } -- 2.39.2