aboutsummaryrefslogtreecommitdiffstats
path: root/taglib/toolkit
diff options
context:
space:
mode:
authorTsuda Kageyu <tsuda.kageyu@gmail.com>2016-12-09 09:56:37 +0900
committerTsuda Kageyu <tsuda.kageyu@gmail.com>2016-12-09 10:09:31 +0900
commita19a623d4bfaa7d26ece05ac73c4716e5710d34f (patch)
tree63d3ed71eda6e546abfd5f0494c59a4a7ad61eae /taglib/toolkit
parent250c59f783f11e5b23eea4cb73063b6ecb28453e (diff)
Make use of increment/decrement operators of std::atomic.
Diffstat (limited to 'taglib/toolkit')
-rw-r--r--taglib/toolkit/trefcounter.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/taglib/toolkit/trefcounter.cpp b/taglib/toolkit/trefcounter.cpp
index eb2aa69f..6638fcaa 100644
--- a/taglib/toolkit/trefcounter.cpp
+++ b/taglib/toolkit/trefcounter.cpp
@@ -31,9 +31,9 @@
#if defined(HAVE_STD_ATOMIC)
# include <atomic>
-# define ATOMIC_INT std::atomic<unsigned int>
-# define ATOMIC_INC(x) x.fetch_add(1)
-# define ATOMIC_DEC(x) (x.fetch_sub(1) - 1)
+# define ATOMIC_INT std::atomic_int
+# define ATOMIC_INC(x) (++x)
+# define ATOMIC_DEC(x) (--x)
#elif defined(HAVE_GCC_ATOMIC)
# define ATOMIC_INT int
# define ATOMIC_INC(x) __sync_add_and_fetch(&x, 1)