mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-03 15:45:46 +08:00
refs #624 Swap functions, move constructors, and move assignment operators should all be noexcept where possible.
This commit is contained in:
@@ -354,10 +354,10 @@ namespace BlackMisc
|
||||
BatchGuard &operator =(const BatchGuard &) = delete;
|
||||
|
||||
//! Move constructor.
|
||||
BatchGuard(BatchGuard &&other) : m_page(other.m_page) { other.m_page = nullptr; }
|
||||
BatchGuard(BatchGuard &&other) noexcept : m_page(other.m_page) { other.m_page = nullptr; }
|
||||
|
||||
//! Move assignment operator.
|
||||
BatchGuard &operator =(BatchGuard &&other) { std::swap(m_page, other.m_page); return *this; }
|
||||
BatchGuard &operator =(BatchGuard &&other) noexcept { std::swap(m_page, other.m_page); return *this; }
|
||||
|
||||
private:
|
||||
friend class CValueCache;
|
||||
|
||||
Reference in New Issue
Block a user