aboutsummaryrefslogtreecommitdiff
path: root/src/unittest
diff options
context:
space:
mode:
authorLoïc Blot <nerzhul@users.noreply.github.com>2017-06-06 14:34:14 +0200
committerGitHub <noreply@github.com>2017-06-06 14:34:14 +0200
commitb3dfe5332cd345c7f33b8a3828649122145f7a12 (patch)
tree8cbde893ad87e4663946f35cc9d19f2b52fcf16b /src/unittest
parenta6678d6e5a46c847c298bdca01e4499b8d601337 (diff)
downloadminetest-b3dfe5332cd345c7f33b8a3828649122145f7a12.tar.gz
minetest-b3dfe5332cd345c7f33b8a3828649122145f7a12.tar.bz2
minetest-b3dfe5332cd345c7f33b8a3828649122145f7a12.zip
C++11 patchset 3: remove Atomic/GenericAtomic and use std::atomic (#5906)
Diffstat (limited to 'src/unittest')
-rw-r--r--src/unittest/test_threading.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/unittest/test_threading.cpp b/src/unittest/test_threading.cpp
index e1e1d3660..03d776539 100644
--- a/src/unittest/test_threading.cpp
+++ b/src/unittest/test_threading.cpp
@@ -19,7 +19,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "test.h"
-#include "threading/atomic.h"
+#include <atomic>
#include "threading/semaphore.h"
#include "threading/thread.h"
@@ -137,7 +137,7 @@ void TestThreading::testThreadKill()
class AtomicTestThread : public Thread {
public:
- AtomicTestThread(Atomic<u32> &v, Semaphore &trigger) :
+ AtomicTestThread(std::atomic<u32> &v, Semaphore &trigger) :
Thread("AtomicTest"),
val(v),
trigger(trigger)
@@ -153,14 +153,14 @@ private:
return NULL;
}
- Atomic<u32> &val;
+ std::atomic<u32> &val;
Semaphore &trigger;
};
void TestThreading::testAtomicSemaphoreThread()
{
- Atomic<u32> val;
+ std::atomic<u32> val;
val = 0;
Semaphore trigger;
static const u8 num_threads = 4;