diff --git a/src/backend/plugin/plugin.cpp b/src/backend/plugin/plugin.cpp index 8a323b77..ae81a7c2 100644 --- a/src/backend/plugin/plugin.cpp +++ b/src/backend/plugin/plugin.cpp @@ -233,7 +233,8 @@ namespace loot { try { PluginLoader loader; - return loader.Load(game, name, true, true); + loader.Load(game, name, true, true); + return true; } catch (std::exception& /*e*/) { BOOST_LOG_TRIVIAL(warning) << "The .es(p|m) file \"" << name << "\" is not a valid plugin."; diff --git a/src/backend/plugin/plugin_loader.cpp b/src/backend/plugin/plugin_loader.cpp index bbbf2584..da52c7fa 100644 --- a/src/backend/plugin/plugin_loader.cpp +++ b/src/backend/plugin/plugin_loader.cpp @@ -38,7 +38,10 @@ using namespace std; namespace loot { PluginLoader::PluginLoader() : _isEmpty(true), _isMaster(false), _crc(0) {} - bool PluginLoader::Load(const Game& game, const std::string& name, const bool headerOnly, const bool checkValidityOnly) { + void PluginLoader::Load(const Game& game, + const std::string& name, + const bool headerOnly, + const bool checkValidityOnly) { espm::File * file = nullptr; espm::Settings espmSettings; @@ -71,7 +74,7 @@ namespace loot { // If only wanting to test for valid parsing, quit now. if (checkValidityOnly) { delete file; - return true; + return; } BOOST_LOG_TRIVIAL(trace) << filepath.filename() << ": " << "Checking master flag."; @@ -116,7 +119,6 @@ namespace loot { } BOOST_LOG_TRIVIAL(trace) << name << ": " << "Plugin loading complete."; - return true; } bool PluginLoader::IsEmpty() const { diff --git a/src/backend/plugin/plugin_loader.h b/src/backend/plugin/plugin_loader.h index 4e22060d..99082d05 100644 --- a/src/backend/plugin/plugin_loader.h +++ b/src/backend/plugin/plugin_loader.h @@ -38,7 +38,10 @@ namespace loot { public: PluginLoader(); - bool Load(const Game& game, const std::string& name, const bool headerOnly, const bool checkValidityOnly); + void Load(const Game& game, + const std::string& name, + const bool headerOnly, + const bool checkValidityOnly); bool IsEmpty() const; bool IsMaster() const; //Checks master bit flag.