CToken: Mark move assignment operator as noexcept

Allows containers and anything using std::move_if_noexcept to perform a
move instead of a copy.
This commit is contained in:
Lioncash 2020-03-27 20:56:01 -04:00
parent 2558da714e
commit 54c6122cbd
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -84,7 +84,7 @@ public:
IObj* GetObj();
const IObj* GetObj() const { return const_cast<CToken*>(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;