From 6c5e5e202394ce8063e3c2d9b663145bc4f8efce Mon Sep 17 00:00:00 2001 From: ShadowNinja Date: Sun, 11 Jun 2017 03:43:05 -0400 Subject: Remove threads.h and replace its definitions with their C++11 equivalents (#5957) This also changes threadProc's signature, since C++11 supports arbitrary thread function signatures. --- src/shader.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/shader.cpp') diff --git a/src/shader.cpp b/src/shader.cpp index 1d3f2f6a1..5ff8c910b 100644 --- a/src/shader.cpp +++ b/src/shader.cpp @@ -308,7 +308,7 @@ public: private: // The id of the thread that is allowed to use irrlicht directly - threadid_t m_main_thread; + std::thread::id m_main_thread; // The irrlicht device IrrlichtDevice *m_device; @@ -359,7 +359,7 @@ ShaderSource::ShaderSource(IrrlichtDevice *device): { assert(m_device); // Pre-condition - m_main_thread = thr_get_current_thread_id(); + m_main_thread = std::this_thread::get_id(); // Add a dummy ShaderInfo as the first index, named "" m_shaderinfo_cache.push_back(ShaderInfo()); @@ -387,7 +387,7 @@ u32 ShaderSource::getShader(const std::string &name, Get shader */ - if (thr_is_current_thread(m_main_thread)) { + if (std::this_thread::get_id() == m_main_thread) { return getShaderIdDirect(name, material_type, drawtype); } else { /*errorstream<<"getShader(): Queued: name=\""<