Skip to content

Missing erase#192

Closed
OfekShilon wants to merge 4 commits intointel:mainfrom
OfekShilon:MissingErase
Closed

Missing erase#192
OfekShilon wants to merge 4 commits intointel:mainfrom
OfekShilon:MissingErase

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