diff --git a/Util/ContainerUtils.h b/Util/ContainerUtils.h index 2517545af..c12ddcf91 100644 --- a/Util/ContainerUtils.h +++ b/Util/ContainerUtils.h @@ -41,7 +41,7 @@ template inline void sort_unique_resize(std::vector &vector) template inline void sort_unique_resize_shrink_vector(std::vector &vector) { sort_unique_resize(vector); - std::vector().swap(vector); + vector.shrink_to_fit(); } template inline void remove_consecutive_duplicates_from_vector(std::vector &vector)