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.
This commit is contained in:
Richard Harrison
2019-03-01 19:00:43 +01:00
parent 7e969f4e28
commit 846f024e91
2 changed files with 4 additions and 4 deletions

View File

@@ -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) {

View File

@@ -378,7 +378,7 @@ typedef SGSharedPtr<SGSubsystem> 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;