Core: Made Mutex and ConditionVariable moveable
Former-commit-id: 891fbb35d050f3df572cbbecd0191b75f556e59d
This commit is contained in:
@@ -101,4 +101,18 @@ namespace Nz
|
||||
NazaraAssert(mutex != nullptr, "Mutex must be valid");
|
||||
return m_impl->Wait(mutex->m_impl, timeout);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Moves a condition to another ConditionVariable object
|
||||
* \return A reference to the object
|
||||
*/
|
||||
ConditionVariable& ConditionVariable::operator=(ConditionVariable&& condition) noexcept
|
||||
{
|
||||
delete m_impl;
|
||||
|
||||
m_impl = condition.m_impl;
|
||||
condition.m_impl = nullptr;
|
||||
|
||||
return *this;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user