summaryrefslogtreecommitdiffstats
path: root/qtools/qshared.h
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2020-08-01 11:27:31 (GMT)
committerGitHub <noreply@github.com>2020-08-01 11:27:31 (GMT)
commit8d96d4594188e4bcdffe8051a097bab8e40596f8 (patch)
tree905dd9b59c9c8004de3506a0b3799450a23c26eb /qtools/qshared.h
parent88e70b5242b2446f33ab700e6d10e7f25ae2c349 (diff)
parent4a1c9f98bc5f9c82e81a694160fecc5a22f0e02c (diff)
downloadDoxygen-8d96d4594188e4bcdffe8051a097bab8e40596f8.zip
Doxygen-8d96d4594188e4bcdffe8051a097bab8e40596f8.tar.gz
Doxygen-8d96d4594188e4bcdffe8051a097bab8e40596f8.tar.bz2
Merge branch 'master' into feature/bug_xml_lang
Diffstat (limited to 'qtools/qshared.h')
-rw-r--r--qtools/qshared.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/qtools/qshared.h b/qtools/qshared.h
index 79fab7b..58ad6fc 100644
--- a/qtools/qshared.h
+++ b/qtools/qshared.h
@@ -1,5 +1,5 @@
/****************************************************************************
-**
+**
**
** Definition of QShared struct
**
@@ -42,13 +42,15 @@
#include "qglobal.h"
#endif // QT_H
+#include <atomic>
+
struct QShared
{
- QShared() { count = 1; }
+ QShared() : count(1) { }
void ref() { count++; }
bool deref() { return !--count; }
- uint count;
+ std::atomic_uint count;
};