From 846f024e91252657313585455ac8dbfc5dbe9657 Mon Sep 17 00:00:00 2001 From: Richard Harrison Date: Fri, 1 Mar 2019 19:00:43 +0100 Subject: [PATCH] SGSubsytem name compatibility for other compilers; changed to use const char* rather than const std::string & as this doesn't work on GCC; and besides std::string converts nicely to const char* and most of the times this is used it is actually a string literal. --- simgear/structure/subsystem_mgr.cxx | 4 ++-- simgear/structure/subsystem_mgr.hxx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/simgear/structure/subsystem_mgr.cxx b/simgear/structure/subsystem_mgr.cxx index 799457f4..bd990546 100644 --- a/simgear/structure/subsystem_mgr.cxx +++ b/simgear/structure/subsystem_mgr.cxx @@ -232,7 +232,7 @@ public: -SGSubsystemGroup::SGSubsystemGroup(const std::string &name) : +SGSubsystemGroup::SGSubsystemGroup(const char *name) : _fixedUpdateTime(-1.0), _updateTimeRemainder(0.0), _initPosition(-1) @@ -837,7 +837,7 @@ namespace { } // end of anonymous namespace -SGSubsystemMgr::SGSubsystemMgr (const std::string &name) : +SGSubsystemMgr::SGSubsystemMgr (const char *name) : _groups(MAX_GROUPS) { if (global_defaultSubsystemManager == nullptr) { diff --git a/simgear/structure/subsystem_mgr.hxx b/simgear/structure/subsystem_mgr.hxx index 3a5c4013..b991a9ef 100644 --- a/simgear/structure/subsystem_mgr.hxx +++ b/simgear/structure/subsystem_mgr.hxx @@ -378,7 +378,7 @@ typedef SGSharedPtr SGSubsystemRef; class SGSubsystemGroup : public SGSubsystem { public: - SGSubsystemGroup (const std::string &name); + SGSubsystemGroup (const char *name); virtual ~SGSubsystemGroup (); void init() override; @@ -501,7 +501,7 @@ public: MAX_GROUPS }; - SGSubsystemMgr (const std::string &name); + SGSubsystemMgr (const char *name); virtual ~SGSubsystemMgr (); void init () override;