diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2020-11-06 09:27:15 -0500 |
|---|---|---|
| committer | isanae <14251494+isanae@users.noreply.github.com> | 2020-11-06 09:27:15 -0500 |
| commit | ad8e9d99b30578676c15d10a74f010439e132406 (patch) | |
| tree | f3058d15be71493e10d1e18b565455d5cb7c84f9 /src/main.cpp | |
| parent | be9c39a3b47a8f93388eaf624b6d007eac22b68e (diff) | |
renamed InstanceManager::instance() to singleton() to avoid confusion
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/main.cpp b/src/main.cpp index 7005d374..e56197c9 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -274,7 +274,7 @@ std::optional<int> handleCommandLine( std::optional<Instance> selectInstance() { - auto& m = InstanceManager::instance(); + auto& m = InstanceManager::singleton(); NexusInterface ni(nullptr); PluginContainer pc(nullptr); @@ -505,7 +505,7 @@ int runApplication( OrganizerCore organizer(settings); if (!organizer.bootstrap()) { reportError("failed to set up data paths"); - InstanceManager::instance().clearCurrentInstance(); + InstanceManager::singleton().clearCurrentInstance(); return 1; } @@ -522,7 +522,7 @@ int runApplication( } else if (setupResult == SetupInstanceResults::TryAgain) { continue; } else if (setupResult == SetupInstanceResults::SelectAnother) { - InstanceManager::instance().clearCurrentInstance(); + InstanceManager::singleton().clearCurrentInstance(); return RestartExitCode; } else { return 1; @@ -650,7 +650,7 @@ int doOneRun( // resets things when MO is "restarted" resetForRestart(cl); - auto& m = InstanceManager::instance(); + auto& m = InstanceManager::singleton(); auto currentInstance = m.currentInstance(); if (!currentInstance) @@ -689,7 +689,7 @@ int doOneRun( if (!setLogDirectory(dataPath)) { reportError("Failed to create log folder"); - InstanceManager::instance().clearCurrentInstance(); + InstanceManager::singleton().clearCurrentInstance(); return 1; } @@ -724,10 +724,10 @@ int main(int argc, char *argv[]) tt.stop(); if (cl.instance()) - InstanceManager::instance().overrideInstance(*cl.instance()); + InstanceManager::singleton().overrideInstance(*cl.instance()); if (cl.profile()) { - InstanceManager::instance().overrideProfile(*cl.profile()); + InstanceManager::singleton().overrideProfile(*cl.profile()); } // makes plugin data path available to plugins, see |
