diff --git a/src/libslic3r/libslic3r.h b/src/libslic3r/libslic3r.h index 69e736cbe5..6de42ca82c 100644 --- a/src/libslic3r/libslic3r.h +++ b/src/libslic3r/libslic3r.h @@ -108,6 +108,10 @@ inline void append(std::vector& dest, std::vector&& src) dest.insert(dest.end(), std::make_move_iterator(src.begin()), std::make_move_iterator(src.end())); + + // Vojta wants back compatibility + src.clear(); + src.shrink_to_fit(); } } @@ -132,6 +136,10 @@ inline void append_reversed(std::vector& dest, std::vector&& src) dest.insert(dest.end(), std::make_move_iterator(src.rbegin()), std::make_move_iterator(src.rend())); + + // Vojta wants back compatibility + src.clear(); + src.shrink_to_fit(); } // Casting an std::vector<> from one type to another type without warnings about a loss of accuracy.