Skip to content

Commit

Permalink
Simplify districts : replace push_back with emplace_back
Browse files Browse the repository at this point in the history
  • Loading branch information
guilpier-code committed Aug 23, 2024
1 parent cf8fa43 commit 842d1d4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/libs/antares/study/area/sets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ void Sets::defaultForAreas()
opts.caption = "All areas";
opts.comments = "Spatial aggregates on all areas";
opts.output = false;
opts.rules.push_back(Rule(ruleFilter, "add-all"));
opts.rules.emplace_back(ruleFilter, "add-all");
auto district = std::make_shared<SetAreasType>();
add("all areas", district, opts);
}
Expand Down Expand Up @@ -209,17 +209,17 @@ bool Sets::loadFromFile(const std::filesystem::path& filename)

if (p->key == "+")
{
opts.rules.push_back(Rule(ruleAdd, value.to<std::string>()));
opts.rules.emplace_back(ruleAdd, value.to<std::string>());
continue;
}
if (p->key == "-")
{
opts.rules.push_back(Rule(ruleRemove, value.to<std::string>()));
opts.rules.emplace_back(ruleRemove, value.to<std::string>());
continue;
}
if (p->key == "apply-filter")
{
opts.rules.push_back(Rule(ruleFilter, value.to<std::string>()));
opts.rules.emplace_back(ruleFilter, value.to<std::string>());
continue;
}
if (p->key == "output")
Expand Down

0 comments on commit 842d1d4

Please sign in to comment.