diff --git a/Runtime/CToken.cpp b/Runtime/CToken.cpp index e30daf34f..38bfa24ed 100644 --- a/Runtime/CToken.cpp +++ b/Runtime/CToken.cpp @@ -112,7 +112,7 @@ CToken& CToken::operator=(const CToken& other) { } return *this; } -CToken& CToken::operator=(CToken&& other) { +CToken& CToken::operator=(CToken&& other) noexcept { Unlock(); RemoveRef(); x0_objRef = other.x0_objRef; diff --git a/Runtime/CToken.hpp b/Runtime/CToken.hpp index ba8722d2b..18b37779c 100644 --- a/Runtime/CToken.hpp +++ b/Runtime/CToken.hpp @@ -84,7 +84,7 @@ public: IObj* GetObj(); const IObj* GetObj() const { return const_cast(this)->GetObj(); } CToken& operator=(const CToken& other); - CToken& operator=(CToken&& other); + CToken& operator=(CToken&& other) noexcept; CToken() = default; CToken(const CToken& other); CToken(CToken&& other) noexcept; @@ -153,7 +153,7 @@ public: m_obj = nullptr; return *this; } - TCachedToken& operator=(const CToken& other) { + TCachedToken& operator=(const CToken& other) override { TToken::operator=(other); m_obj = nullptr; return *this; @@ -172,7 +172,7 @@ public: return *this; } TLockedToken(const CToken& other) : TCachedToken(other) { CToken::Lock(); } - TLockedToken& operator=(const CToken& other) { + TLockedToken& operator=(const CToken& other) override { CToken oldTok = std::move(*this); TCachedToken::operator=(other); CToken::Lock();