diff --git a/src/gen_policy.cpp b/src/gen_policy.cpp index 432be8f..53074cf 100644 --- a/src/gen_policy.cpp +++ b/src/gen_policy.cpp @@ -540,4 +540,5 @@ void GenPolicy::removeProbability(std::vector> &orig, U id) { std::remove_if( orig.begin(), orig.end(), [&id](Probability &elem) -> bool { return elem.getId() == id; }); + orig.erase(new_end, orig.end()); }