Skip to content

Commit

Permalink
Simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanGriffiths committed Oct 24, 2023
1 parent cdb6a57 commit c539fb4
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/server/graphics/default_configuration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,11 @@ auto select_platforms_from_list(std::string const& selection, std::vector<std::s
auto const description = describe_module();
found_module_names.emplace_back(description->name);

if (std::find(requested_modules.begin(), requested_modules.end(), description->name) != requested_modules.end())
if (auto const i = std::find(requested_modules.begin(), requested_modules.end(), description->name);
i != requested_modules.end())
{
selected_modules.push_back(module);
requested_modules.erase(
std::remove(
requested_modules.begin(),
requested_modules.end(),
description->name),
requested_modules.end());
requested_modules.erase(i);
}
}
catch (std::exception const&)
Expand Down

0 comments on commit c539fb4

Please sign in to comment.