mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 20:15:35 +08:00
refs #624 Swap functions, move constructors, and move assignment operators should all be noexcept where possible.
This commit is contained in:
@@ -29,8 +29,8 @@ namespace BlackMisc
|
||||
public:
|
||||
LockGuard(const LockGuard &) = delete;
|
||||
LockGuard &operator =(const LockGuard &) = delete;
|
||||
LockGuard(LockGuard &&other) : m_movedFrom(true) { *this = std::move(other); }
|
||||
LockGuard &operator =(LockGuard &&other) { std::swap(m_movedFrom, other.m_movedFrom); std::swap(m_rev, other.m_rev); return *this; }
|
||||
LockGuard(LockGuard &&other) noexcept : m_movedFrom(true) { *this = std::move(other); }
|
||||
LockGuard &operator =(LockGuard &&other) noexcept { std::swap(m_movedFrom, other.m_movedFrom); std::swap(m_rev, other.m_rev); return *this; }
|
||||
|
||||
~LockGuard()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user