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:
Lioncash 2020-04-05 09:28:03 -04:00
parent caca49b3bd
commit b5a26d5136
1 changed files with 2 additions and 2 deletions

View File

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