Skip to content

Commit

Permalink
Fix: remove_if called without erase
Browse files Browse the repository at this point in the history
  • Loading branch information
OfekShilon committed Dec 7, 2023
1 parent 2024749 commit ccc9b40
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/gen_policy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -540,4 +540,5 @@ 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; });
orig.erase(new_end, orig.end());
}

0 comments on commit ccc9b40

Please sign in to comment.