Cleanup some clang-tidy issues

This commit is contained in:
greg7mdp
2023-04-23 19:40:33 -04:00
parent e4b6668d46
commit 16287ccca6
8 changed files with 27 additions and 21 deletions
+7 -7
View File
@@ -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;