Let the module registration script return a lambda that will contain all modules, thus removing the static initialization order problem

This commit is contained in:
Alexander Bock
2016-07-31 19:25:15 +02:00
parent e39a7983aa
commit 393f39de2e
3 changed files with 6 additions and 4 deletions

View File

@@ -40,7 +40,7 @@ namespace {
namespace openspace {
void ModuleEngine::initialize() {
for (OpenSpaceModule* m : AllModules)
for (OpenSpaceModule* m : AllModules())
registerModule(std::unique_ptr<OpenSpaceModule>(m));
}