Optimized a check
No need to check for an addon that's not required.
This commit is contained in:
parent
eebd01ca7e
commit
f14d23ae6a
1 changed files with 2 additions and 2 deletions
|
@ -214,8 +214,8 @@ game_info::game_info(const config& game, const std::vector<std::string>& install
|
|||
|
||||
// Parse the list of addons required to join this game.
|
||||
for(const config& addon : game.child_range("addon")) {
|
||||
if(addon.has_attribute("id")) {
|
||||
if(std::find(installed_addons.begin(), installed_addons.end(), addon["id"].str()) == installed_addons.end() && addon["require"].to_bool(false)) {
|
||||
if(addon.has_attribute("id") && addon["require"].to_bool(false)) {
|
||||
if(std::find(installed_addons.begin(), installed_addons.end(), addon["id"].str()) == installed_addons.end()) {
|
||||
required_addon r;
|
||||
r.addon_id = addon["id"].str();
|
||||
r.outcome = NEED_DOWNLOAD;
|
||||
|
|
Loading…
Add table
Reference in a new issue