summaryrefslogtreecommitdiff
path: root/src/threading
diff options
context:
space:
mode:
authorkwolekr <kwolekr@minetest.net>2015-10-31 02:38:23 -0400
committerkwolekr <kwolekr@minetest.net>2015-10-31 02:38:23 -0400
commitfdede6003446efe2002fc650f635f1be73265116 (patch)
tree3b4ef31ff3d554ff515e3c67734d9a63b616f088 /src/threading
parent482c4d69b094bddf5e6e10dfc996a972a628850a (diff)
downloadminetest-fdede6003446efe2002fc650f635f1be73265116.tar.gz
minetest-fdede6003446efe2002fc650f635f1be73265116.tar.bz2
minetest-fdede6003446efe2002fc650f635f1be73265116.zip
Fix C++11 compatibility
Diffstat (limited to 'src/threading')
-rw-r--r--src/threading/thread.cpp6
-rw-r--r--src/threading/thread.h1
2 files changed, 4 insertions, 3 deletions
diff --git a/src/threading/thread.cpp b/src/threading/thread.cpp
index 0996a9e34..57b551503 100644
--- a/src/threading/thread.cpp
+++ b/src/threading/thread.cpp
@@ -117,9 +117,9 @@ bool Thread::start()
try {
m_thread_obj = new std::thread(threadProc, this);
- m_thread_id = m_thread->get_id();
- m_thread_handle = m_thread->native_handle();
- } except (const std::system_error &e) {
+ m_thread_id = m_thread_obj->get_id();
+ m_thread_handle = m_thread_obj->native_handle();
+ } catch (const std::system_error &e) {
return false;
}
diff --git a/src/threading/thread.h b/src/threading/thread.h
index 83ca785c7..5f2d8aad1 100644
--- a/src/threading/thread.h
+++ b/src/threading/thread.h
@@ -26,6 +26,7 @@ DEALINGS IN THE SOFTWARE.
#ifndef THREADING_THREAD_H
#define THREADING_THREAD_H
+#include "basicmacros.h"
#include "threading/atomic.h"
#include "threading/mutex.h"
#include "threads.h"