From 85454857d386d06b8e90fc63a2098ba472302062 Mon Sep 17 00:00:00 2001 From: Patrick Niklaus Date: Thu, 6 Apr 2017 11:24:23 +0000 Subject: [PATCH] Use default move function --- include/util/deallocating_vector.hpp | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/include/util/deallocating_vector.hpp b/include/util/deallocating_vector.hpp index 17b805826..99b36363b 100644 --- a/include/util/deallocating_vector.hpp +++ b/include/util/deallocating_vector.hpp @@ -242,19 +242,9 @@ class DeallocatingVector // copying is not safe since this would only do a shallow copy DeallocatingVector(DeallocatingVector &other) = delete; DeallocatingVector &operator=(DeallocatingVector &other) = delete; - - DeallocatingVector(DeallocatingVector &&other) - { - bucket_list = std::move(other.bucket_list); - current_size = std::move(other.current_size); - } - - DeallocatingVector &operator=(DeallocatingVector &&other) - { - bucket_list = std::move(other.bucket_list); - current_size = std::move(other.current_size); - return *this; - } + // moving is fine + DeallocatingVector(DeallocatingVector &&other) = default; + DeallocatingVector &operator=(DeallocatingVector &&other) = default; ~DeallocatingVector() { clear(); }