Skip to content

Commit

Permalink
Address a TODO-C++11 comment in backend loader code
Browse files Browse the repository at this point in the history
Use return value of std::map::erase() now that we do use C++11.

No real changes, just simplify the code a bit.
  • Loading branch information
vadz committed Oct 7, 2024
1 parent 33941b1 commit 2fd6263
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/core/backend-loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -307,11 +307,7 @@ factory_map::iterator do_unload(factory_map::iterator i)
DLCLOSE(h);
}

// TODO-C++11: Use erase() return value.
factory_map::iterator const to_erase = i;
++i;
factories_.erase(to_erase);
return i;
return factories_.erase(i);
}

void do_unload_or_throw_if_in_use(std::string const & name)
Expand Down

0 comments on commit 2fd6263

Please sign in to comment.