Cleaned Thread class code

Former-commit-id: d8c918c7a3c50ed3ed2f225303540d3860863d4e
This commit is contained in:
Lynix 2013-05-30 02:59:08 +02:00
parent 465a7c246d
commit e0229ab390
2 changed files with 9 additions and 8 deletions

View File

@ -22,8 +22,6 @@ class NAZARA_API NzThread : NzNonCopyable
friend NzThread;
public:
Id() = default;
NAZARA_API friend bool operator==(const Id& lhs, const Id& rhs);
NAZARA_API friend bool operator!=(const Id& lhs, const Id& rhs);
NAZARA_API friend bool operator<(const Id& lhs, const Id& rhs);
@ -39,7 +37,7 @@ class NAZARA_API NzThread : NzNonCopyable
NzThreadImpl* m_id = nullptr;
};
NzThread() = default;
NzThread();
template<typename F> NzThread(F function);
template<typename F, typename... Args> NzThread(F function, Args... args);
template<typename C> NzThread(void (C::*function)(), C* object);
@ -59,7 +57,7 @@ class NAZARA_API NzThread : NzNonCopyable
private:
void CreateImpl(NzFunctor* functor);
NzThreadImpl* m_impl = nullptr;
NzThreadImpl* m_impl;
};
#include <Nazara/Core/Thread.inl>

View File

@ -2,8 +2,6 @@
// This file is part of the "Nazara Engine - Core module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// Inspiré du code de la SFML par Laurent Gomila
#include <Nazara/Core/Thread.hpp>
#include <Nazara/Core/Config.hpp>
#include <Nazara/Core/Error.hpp>
@ -20,7 +18,7 @@
#include <Nazara/Core/Debug.hpp>
///********************************NzThread::Id********************************
/*********************************NzThread::Id********************************/
bool operator==(const NzThread::Id& lhs, const NzThread::Id& rhs)
{
@ -63,7 +61,12 @@ m_id(thread)
{
}
///**********************************NzThread**********************************
/***********************************NzThread**********************************/
NzThread::NzThread() :
m_impl(nullptr)
{
}
NzThread::NzThread(NzThread&& other) :
m_impl(other.m_impl)