Improved code

Former-commit-id: 33082b8f9d55c7a3b9550c788eb27fc613c08032
This commit is contained in:
Lynix
2013-06-05 13:24:33 +02:00
parent a1da3395cd
commit fbc0d7404e
4 changed files with 65 additions and 65 deletions

View File

@@ -18,51 +18,6 @@
#include <Nazara/Core/Debug.hpp>
/*********************************NzThread::Id********************************/
bool operator==(const NzThread::Id& lhs, const NzThread::Id& rhs)
{
return lhs.m_id == rhs.m_id;
}
bool operator!=(const NzThread::Id& lhs, const NzThread::Id& rhs)
{
return lhs.m_id != rhs.m_id;
}
bool operator<(const NzThread::Id& lhs, const NzThread::Id& rhs)
{
return lhs.m_id < rhs.m_id;
}
bool operator<=(const NzThread::Id& lhs, const NzThread::Id& rhs)
{
return lhs.m_id <= rhs.m_id;
}
bool operator>(const NzThread::Id& lhs, const NzThread::Id& rhs)
{
return lhs.m_id > rhs.m_id;
}
bool operator>=(const NzThread::Id& lhs, const NzThread::Id& rhs)
{
return lhs.m_id >= rhs.m_id;
}
bool operator<<(std::ostream& o, const NzThread::Id& id)
{
o << id.m_id;
return o;
}
NzThread::Id::Id(NzThreadImpl* thread) :
m_id(thread)
{
}
/***********************************NzThread**********************************/
NzThread::NzThread() :
m_impl(nullptr)
{
@@ -147,3 +102,46 @@ void NzThread::CreateImpl(NzFunctor* functor)
{
m_impl = new NzThreadImpl(functor);
}
/*********************************NzThread::Id********************************/
bool operator==(const NzThread::Id& lhs, const NzThread::Id& rhs)
{
return lhs.m_id == rhs.m_id;
}
bool operator!=(const NzThread::Id& lhs, const NzThread::Id& rhs)
{
return lhs.m_id != rhs.m_id;
}
bool operator<(const NzThread::Id& lhs, const NzThread::Id& rhs)
{
return lhs.m_id < rhs.m_id;
}
bool operator<=(const NzThread::Id& lhs, const NzThread::Id& rhs)
{
return lhs.m_id <= rhs.m_id;
}
bool operator>(const NzThread::Id& lhs, const NzThread::Id& rhs)
{
return lhs.m_id > rhs.m_id;
}
bool operator>=(const NzThread::Id& lhs, const NzThread::Id& rhs)
{
return lhs.m_id >= rhs.m_id;
}
bool operator<<(std::ostream& o, const NzThread::Id& id)
{
o << id.m_id;
return o;
}
NzThread::Id::Id(NzThreadImpl* thread) :
m_id(thread)
{
}