UniformBufferPool: Make Token move constructor and move assignment noexcept

Allows the type to be used with containers and facilities that make use
of std::move_if_noexcept, etc.
This commit is contained in:
Lioncash 2020-04-05 09:26:27 -04:00
parent 1a031f54c4
commit caca49b3bd
1 changed files with 2 additions and 2 deletions

View File

@ -129,14 +129,14 @@ public:
Token() = default;
Token(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_index = other.m_index;
m_div = other.m_div;
other.m_index = -1;
return *this;
}
Token(Token&& other) : m_pool(other.m_pool), m_index(other.m_index), m_div(other.m_div) { other.m_index = -1; }
Token(Token&& other) noexcept : m_pool(other.m_pool), m_index(other.m_index), m_div(other.m_div) { other.m_index = -1; }
~Token() {
if (m_index != -1) {