Skip to content

Commit

Permalink
Fix variable shadowing
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonMarechal25 committed Jul 26, 2023
1 parent bd3d1b2 commit 0b776f1
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,11 @@ namespace Antares::Data {
}

std::shared_ptr<BindingConstraintGroup> BindingConstraintGroupRepository::operator[](std::string name) {
if (auto group = std::find_if(groups_.begin(), groups_.end(), [&name](auto group) {
return group->name() == name;
}); group != groups_.end()) {
if (auto group = std::find_if(groups_.begin(), groups_.end(), [&name](auto group_of_constraint) {
return group_of_constraint->name() == name;
});
group != groups_.end())
{
return *group;
}
return nullptr;
Expand Down

0 comments on commit 0b776f1

Please sign in to comment.