Skip to content

Commit

Permalink
[cpp] Fix that del_method did not actually delete it from the std::ve…
Browse files Browse the repository at this point in the history
…ctor
  • Loading branch information
jcelerier authored and JohannesLorenz committed Jan 13, 2024
1 parent ed21c61 commit 9efdb8e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lo/lo_cpp.h
Original file line number Diff line number Diff line change
Expand Up @@ -634,8 +634,9 @@ namespace lo {
{
LO_CHECK_BEFORE;
for (auto &i : _handlers) {
std::remove_if(i.second.begin(), i.second.end(),
auto it = std::remove_if(i.second.begin(), i.second.end(),
[&](std::unique_ptr<handler>& h){return h->method == m;});
i.second.erase(it, i.second.end());
}
return lo_server_del_lo_method(server, m);
}
Expand Down

0 comments on commit 9efdb8e

Please sign in to comment.