Core: Made Mutex and ConditionVariable moveable

Former-commit-id: 891fbb35d050f3df572cbbecd0191b75f556e59d
This commit is contained in:
Lynix
2016-03-01 13:59:17 +01:00
parent 790275da8f
commit f9a95ce054
6 changed files with 90 additions and 4 deletions

View File

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