mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Remove unnecessary equality operators.
For Game and GameSettings classes.
This commit is contained in:
@@ -74,18 +74,6 @@ namespace loot {
|
||||
RefreshActivePluginsList();
|
||||
}
|
||||
|
||||
bool Game::operator == (const Game& rhs) const {
|
||||
return (boost::iequals(Name(), rhs.Name()) || boost::iequals(FolderName(), rhs.FolderName()));
|
||||
}
|
||||
|
||||
bool Game::operator == (const GameSettings& rhs) const {
|
||||
return (boost::iequals(Name(), rhs.Name()) || boost::iequals(FolderName(), rhs.FolderName()));
|
||||
}
|
||||
|
||||
bool Game::operator == (const std::string& nameOrFolderName) const {
|
||||
return (boost::iequals(Name(), nameOrFolderName) || boost::iequals(FolderName(), nameOrFolderName));
|
||||
}
|
||||
|
||||
void Game::RefreshActivePluginsList() {
|
||||
activePlugins = GetActivePlugins();
|
||||
}
|
||||
|
||||
@@ -53,11 +53,6 @@ namespace loot {
|
||||
|
||||
void Init(bool createFolder, const boost::filesystem::path& gameLocalAppData = "");
|
||||
|
||||
//Compare names and folder names.
|
||||
bool operator == (const Game& rhs) const;
|
||||
bool operator == (const GameSettings& rhs) const;
|
||||
bool operator == (const std::string& nameOrFolderName) const;
|
||||
|
||||
void RefreshActivePluginsList();
|
||||
void RedatePlugins(); //Change timestamps to match load order (Skyrim only).
|
||||
|
||||
|
||||
@@ -116,10 +116,6 @@ namespace loot {
|
||||
return (boost::iequals(_name, rhs.Name()) || boost::iequals(_lootFolderName, rhs.FolderName()));
|
||||
}
|
||||
|
||||
bool GameSettings::operator == (const std::string& nameOrFolderName) const {
|
||||
return (boost::iequals(_name, nameOrFolderName) || boost::iequals(_lootFolderName, nameOrFolderName));
|
||||
}
|
||||
|
||||
unsigned int GameSettings::Id() const {
|
||||
return _id;
|
||||
}
|
||||
|
||||
@@ -42,7 +42,6 @@ namespace loot {
|
||||
bool IsInstalled(); //Sets gamePath if the current value is not valid and a valid path is found.
|
||||
|
||||
bool operator == (const GameSettings& rhs) const; //Compares names and folder names.
|
||||
bool operator == (const std::string& nameOrFolderName) const;
|
||||
|
||||
unsigned int Id() const;
|
||||
std::string Name() const; //Returns the game's name, eg. "TES IV: Oblivion".
|
||||
|
||||
@@ -221,7 +221,7 @@ namespace loot {
|
||||
base::AutoLock lock_scope(_lock);
|
||||
|
||||
BOOST_LOG_TRIVIAL(debug) << "Changing current game to that with folder: " << newGameFolder;
|
||||
_currentGame = find(_games.begin(), _games.end(), newGameFolder);
|
||||
_currentGame = find(_games.begin(), _games.end(), Game(Game::autodetect, newGameFolder));
|
||||
_currentGame->Init(true);
|
||||
|
||||
// Update game path in settings object.
|
||||
|
||||
Reference in New Issue
Block a user