mirror of https://github.com/AxioDL/metaforce.git
VertexBufferPool: Make Token move constructor and move assignment noexcept
Same behavior, but allows the type to be used nicely with containers and move facilities that rely on std::move_if_noexcept.
This commit is contained in:
parent
caca49b3bd
commit
b5a26d5136
|
@ -132,7 +132,7 @@ public:
|
||||||
Token() = default;
|
Token() = default;
|
||||||
Token(const Token& other) = delete;
|
Token(const Token& other) = delete;
|
||||||
Token& operator=(const Token& other) = delete;
|
Token& operator=(const Token& other) = delete;
|
||||||
Token& operator=(Token&& other) {
|
Token& operator=(Token&& other) noexcept {
|
||||||
m_pool = other.m_pool;
|
m_pool = other.m_pool;
|
||||||
m_index = other.m_index;
|
m_index = other.m_index;
|
||||||
m_count = other.m_count;
|
m_count = other.m_count;
|
||||||
|
@ -140,7 +140,7 @@ public:
|
||||||
other.m_index = -1;
|
other.m_index = -1;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
Token(Token&& other) : m_pool(other.m_pool), m_index(other.m_index), m_count(other.m_count), m_div(other.m_div) {
|
Token(Token&& other) noexcept : m_pool(other.m_pool), m_index(other.m_index), m_count(other.m_count), m_div(other.m_div) {
|
||||||
other.m_index = -1;
|
other.m_index = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue