Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing erase #192

Closed
wants to merge 4 commits into from
Closed

Missing erase #192

wants to merge 4 commits into from

Conversation

OfekShilon
Copy link
Contributor

This code:

yarpgen/src/gen_policy.cpp

Lines 538 to 543 in d3f19f4

template <class T, class U>
void GenPolicy::removeProbability(std::vector<Probability<T>> &orig, U id) {
std::remove_if(
orig.begin(), orig.end(),
[&id](Probability<T> &elem) -> bool { return elem.getId() == id; });
}

includes an std::remove_if which just swaps the elements to be removed to higher addresses. The intention was probably to delete them.

@dbabokin
Copy link
Contributor

dbabokin commented Dec 4, 2023

Please rebase

@OfekShilon OfekShilon closed this by deleting the head repository Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants