mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-08-12 12:19:05 +00:00
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:
parent
2558da714e
commit
54c6122cbd
@ -112,7 +112,7 @@ CToken& CToken::operator=(const CToken& other) {
|
|||||||
}
|
}
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
CToken& CToken::operator=(CToken&& other) {
|
CToken& CToken::operator=(CToken&& other) noexcept {
|
||||||
Unlock();
|
Unlock();
|
||||||
RemoveRef();
|
RemoveRef();
|
||||||
x0_objRef = other.x0_objRef;
|
x0_objRef = other.x0_objRef;
|
||||||
|
@ -84,7 +84,7 @@ public:
|
|||||||
IObj* GetObj();
|
IObj* GetObj();
|
||||||
const IObj* GetObj() const { return const_cast<CToken*>(this)->GetObj(); }
|
const IObj* GetObj() const { return const_cast<CToken*>(this)->GetObj(); }
|
||||||
CToken& operator=(const CToken& other);
|
CToken& operator=(const CToken& other);
|
||||||
CToken& operator=(CToken&& other);
|
CToken& operator=(CToken&& other) noexcept;
|
||||||
CToken() = default;
|
CToken() = default;
|
||||||
CToken(const CToken& other);
|
CToken(const CToken& other);
|
||||||
CToken(CToken&& other) noexcept;
|
CToken(CToken&& other) noexcept;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user