Skip to content

Commit

Permalink
Modernise loop
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanGriffiths committed Sep 10, 2024
1 parent 86a5a63 commit df25e31
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/miral/launch_app.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ void Environment::setenv(std::string const& name, std::string const& value)
{
auto const entry = name + "=" + value;

for (auto it = env_strings.begin(); it != env_strings.end(); ++it)
for (auto& e : env_strings)
{
if (strncmp(it->c_str(), name.c_str(), name.size()) == 0)
if (strncmp(e.c_str(), name.c_str(), name.size()) == 0)
{
*it = entry;
e = entry;
return;
}
}
Expand Down

0 comments on commit df25e31

Please sign in to comment.