Use vector::swap instead of copying to a local vector and clearing the original. We can just swap into the just created local vector instead which will move the pointers and not the data. Use std::move in another place to avoid a copy.
169 KiB
169 KiB