1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

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.
This commit is contained in:
ShadowNinja 2017-06-11 03:43:05 -04:00 committed by Loïc Blot
parent 5cc8ad946e
commit 6c5e5e2023
16 changed files with 82 additions and 160 deletions

View file

@ -24,8 +24,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include <queue>
#include <string>
#include <fstream>
#include <thread>
#include <mutex>
#include "threads.h"
#include "irrlichttypes.h"
class ILogOutput;
@ -79,7 +79,7 @@ private:
// written to when one thread has access currently).
// Works on all known architectures (x86, ARM, MIPS).
volatile bool m_silenced_levels[LL_MAX];
std::map<threadid_t, std::string> m_thread_names;
std::map<std::thread::id, std::string> m_thread_names;
mutable std::mutex m_mutex;
bool m_trace_enabled;
};