mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-05 11:09:37 -06:00
Update Ghoul
Adapted to new ghoul version
This commit is contained in:
Submodule ext/ghoul updated: 62d6b98d7d...fed2001d06
@@ -78,8 +78,10 @@ bool ConfigurationManager::loadFromFile(const std::string& filename) {
|
||||
FileSys.registerPathToken(basePathToken, basePath);
|
||||
|
||||
// Loading the configuration file into ourselves
|
||||
const bool loadingSuccess = ghoul::lua::loadDictionaryFromFile(filename, *this);
|
||||
if (!loadingSuccess) {
|
||||
try {
|
||||
ghoul::lua::loadDictionaryFromFile(filename, *this);
|
||||
}
|
||||
catch (...) {
|
||||
LERROR("Loading dictionary from file failed");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -90,9 +90,12 @@ bool SceneGraph::loadFromFile(const std::string& sceneDescription) {
|
||||
|
||||
// Load dictionary
|
||||
ghoul::Dictionary sceneDictionary;
|
||||
bool success = ghoul::lua::loadDictionaryFromFile(absSceneFile, sceneDictionary);
|
||||
if (!success)
|
||||
try {
|
||||
ghoul::lua::loadDictionaryFromFile(absSceneFile, sceneDictionary);
|
||||
}
|
||||
catch (...) {
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string sceneDescriptionDirectory =
|
||||
ghoul::filesystem::File(absSceneFile, true).directoryName();
|
||||
@@ -116,7 +119,7 @@ bool SceneGraph::loadFromFile(const std::string& sceneDescription) {
|
||||
}
|
||||
|
||||
ghoul::Dictionary moduleDictionary;
|
||||
success = sceneDictionary.getValue(KeyModules, moduleDictionary);
|
||||
bool success = sceneDictionary.getValue(KeyModules, moduleDictionary);
|
||||
if (!success)
|
||||
// There are no modules that are loaded
|
||||
return true;
|
||||
@@ -182,9 +185,12 @@ bool SceneGraph::loadFromFile(const std::string& sceneDescription) {
|
||||
}
|
||||
|
||||
ghoul::Dictionary moduleDictionary;
|
||||
bool s = ghoul::lua::loadDictionaryFromFile(moduleFile, moduleDictionary, state);
|
||||
if (!s)
|
||||
try {
|
||||
ghoul::lua::loadDictionaryFromFile(moduleFile, moduleDictionary, state);
|
||||
}
|
||||
catch (...) {
|
||||
continue;
|
||||
}
|
||||
|
||||
std::vector<std::string> keys = moduleDictionary.keys();
|
||||
for (const std::string& key : keys) {
|
||||
|
||||
Reference in New Issue
Block a user