diff --git a/include/Nazara/Core/Thread.hpp b/include/Nazara/Core/Thread.hpp index c86687cd5..496f44e23 100644 --- a/include/Nazara/Core/Thread.hpp +++ b/include/Nazara/Core/Thread.hpp @@ -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 NzThread(F function); template NzThread(F function, Args... args); template 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 diff --git a/src/Nazara/Core/Thread.cpp b/src/Nazara/Core/Thread.cpp index 8c75ff068..2496c025e 100644 --- a/src/Nazara/Core/Thread.cpp +++ b/src/Nazara/Core/Thread.cpp @@ -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 #include #include @@ -20,7 +18,7 @@ #include -///********************************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)