Minor improvement (#7766)

This commit is contained in:
Saman
2023-01-08 11:40:03 +08:00
committed by GitHub
parent c2668fc0e2
commit 5638a6a900
4 changed files with 7 additions and 7 deletions

View File

@@ -45,7 +45,7 @@ class vector_downward {
cur_(nullptr),
scratch_(nullptr) {}
vector_downward(vector_downward &&other)
vector_downward(vector_downward &&other) noexcept
// clang-format on
: allocator_(other.allocator_),
own_allocator_(other.own_allocator_),
@@ -66,7 +66,7 @@ class vector_downward {
other.scratch_ = nullptr;
}
vector_downward &operator=(vector_downward &&other) {
vector_downward &operator=(vector_downward &&other) noexcept {
// Move construct a temporary and swap idiom
vector_downward temp(std::move(other));
swap(temp);