mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Don't return a bool from PluginLoader::Load().
It never returns false, so there's no point returning true.
This commit is contained in:
@@ -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.";
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user