mirror of
https://github.com/greg7mdp/parallel-hashmap.git
synced 2026-08-29 16:40:39 +08:00
Cleanup some clang-tidy issues
This commit is contained in:
Vendored
+7
-7
@@ -2047,7 +2047,7 @@ public:
|
||||
optional(const optional& src) = default;
|
||||
|
||||
// Move constructor, standard semantics
|
||||
optional(optional&& src) = default;
|
||||
optional(optional&& src) noexcept = default;
|
||||
|
||||
// Constructs a non-empty `optional` direct-initialized value of type `T` from
|
||||
// the arguments `std::forward<Args>(args)...` within the `optional`.
|
||||
@@ -2187,7 +2187,7 @@ public:
|
||||
optional& operator=(const optional& src) = default;
|
||||
|
||||
// Move assignment operator, standard semantics
|
||||
optional& operator=(optional&& src) = default;
|
||||
optional& operator=(optional&& src) noexcept = default;
|
||||
|
||||
// Value assignment operators
|
||||
template <
|
||||
@@ -4765,7 +4765,7 @@ public:
|
||||
DoNothing(mutex_type&, phmap::try_to_lock_t) {}
|
||||
template<class T> explicit DoNothing(T&&) {}
|
||||
DoNothing& operator=(const DoNothing&) { return *this; }
|
||||
DoNothing& operator=(DoNothing&&) { return *this; }
|
||||
DoNothing& operator=(DoNothing&&) noexcept { return *this; }
|
||||
void swap(DoNothing &) {}
|
||||
bool owns_lock() const noexcept { return true; }
|
||||
};
|
||||
@@ -4796,13 +4796,13 @@ public:
|
||||
m_->try_lock();
|
||||
}
|
||||
|
||||
WriteLock(WriteLock &&o) :
|
||||
WriteLock(WriteLock &&o) noexcept :
|
||||
m_(std::move(o.m_)), locked_(std::move(o.locked_)) {
|
||||
o.locked_ = false;
|
||||
o.m_ = nullptr;
|
||||
}
|
||||
|
||||
WriteLock& operator=(WriteLock&& other) {
|
||||
WriteLock& operator=(WriteLock&& other) noexcept {
|
||||
WriteLock temp(std::move(other));
|
||||
swap(temp);
|
||||
return *this;
|
||||
@@ -4874,13 +4874,13 @@ public:
|
||||
m_->try_lock_shared();
|
||||
}
|
||||
|
||||
ReadLock(ReadLock &&o) :
|
||||
ReadLock(ReadLock &&o) noexcept :
|
||||
m_(std::move(o.m_)), locked_(std::move(o.locked_)) {
|
||||
o.locked_ = false;
|
||||
o.m_ = nullptr;
|
||||
}
|
||||
|
||||
ReadLock& operator=(ReadLock&& other) {
|
||||
ReadLock& operator=(ReadLock&& other) noexcept {
|
||||
ReadLock temp(std::move(other));
|
||||
swap(temp);
|
||||
return *this;
|
||||
|
||||
Reference in New Issue
Block a user