Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/QAtomicIntCompat.h19
-rw-r--r--src/Utils.h1
-rw-r--r--src/murmur/MurmurIce.cpp2
-rw-r--r--src/murmur/Server.cpp2
-rw-r--r--src/murmur/murmur_pch.h2
-rw-r--r--src/tests/TestSSLLocks/TestSSLLocks.cpp3
6 files changed, 3 insertions, 26 deletions
diff --git a/src/QAtomicIntCompat.h b/src/QAtomicIntCompat.h
deleted file mode 100644
index 7fb08d16e..000000000
--- a/src/QAtomicIntCompat.h
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2005-2019 The Mumble Developers. All rights reserved.
-// Use of this source code is governed by a BSD-style license
-// that can be found in the LICENSE file at the root of the
-// Mumble source tree or at <https://www.mumble.info/LICENSE>.
-
-#ifndef MUMBLE_QATOMICINTCOMPAT_H_
-#define MUMBLE_QATOMICINTCOMPAT_H_
-
-// Portably (between Qt 4 and Qt 5) load the value
-// of a QAtomicInt.
-inline int QAtomicIntLoad(const QAtomicInt &ai) {
-#if QT_VERSION >= 0x050000
- return ai.load();
-#else
- return int(ai);
-#endif
-}
-
-#endif
diff --git a/src/Utils.h b/src/Utils.h
index a1a66e2f6..3b3cd3c83 100644
--- a/src/Utils.h
+++ b/src/Utils.h
@@ -8,7 +8,6 @@
#ifndef MUMBLE_UTILS_H_
#define MUMBLE_UTILS_H_
-#include "QAtomicIntCompat.h"
#include "Qt4Compat.h"
#include <QtCore/QtGlobal>
diff --git a/src/murmur/MurmurIce.cpp b/src/murmur/MurmurIce.cpp
index 14d4b336f..8cf319e63 100644
--- a/src/murmur/MurmurIce.cpp
+++ b/src/murmur/MurmurIce.cpp
@@ -123,7 +123,7 @@ static void userToUser(const ::User *p, Murmur::User &mp) {
mp.udpPing = u->dUDPPingAvg;
mp.tcpPing = u->dTCPPingAvg;
- mp.tcponly = QAtomicIntLoad(u->aiUdpFlag) == 0;
+ mp.tcponly = u->aiUdpFlag.load() == 0;
::Murmur::NetAddress addr(16, 0);
const Q_IPV6ADDR &a = u->haAddress.qip6;
diff --git a/src/murmur/Server.cpp b/src/murmur/Server.cpp
index 84e5b4ebe..4fc502396 100644
--- a/src/murmur/Server.cpp
+++ b/src/murmur/Server.cpp
@@ -934,7 +934,7 @@ bool Server::checkDecrypt(ServerUser *u, const char *encrypt, char *plain, unsig
}
void Server::sendMessage(ServerUser *u, const char *data, int len, QByteArray &cache, bool force) {
- if ((QAtomicIntLoad(u->aiUdpFlag) == 1 || force) && (u->sUdpSocket != INVALID_SOCKET)) {
+ if ((u->aiUdpFlag.load() == 1 || force) && (u->sUdpSocket != INVALID_SOCKET)) {
#if defined(__LP64__)
STACKVAR(char, ebuffer, len+4+16);
char *buffer = reinterpret_cast<char *>(((reinterpret_cast<quint64>(ebuffer) + 8) & ~7) + 4);
diff --git a/src/murmur/murmur_pch.h b/src/murmur/murmur_pch.h
index eb2405e94..2b6fd4078 100644
--- a/src/murmur/murmur_pch.h
+++ b/src/murmur/murmur_pch.h
@@ -32,8 +32,6 @@
# include <QtDBus/QtDBus>
#endif
-#include "QAtomicIntCompat.h"
-
#ifdef Q_OS_WIN
# include <QtGui/QtGui>
# if QT_VERSION >= 0x050000
diff --git a/src/tests/TestSSLLocks/TestSSLLocks.cpp b/src/tests/TestSSLLocks/TestSSLLocks.cpp
index 7b9cc41a2..289138ea4 100644
--- a/src/tests/TestSSLLocks/TestSSLLocks.cpp
+++ b/src/tests/TestSSLLocks/TestSSLLocks.cpp
@@ -7,7 +7,6 @@
#include <QtTest>
#include "SSL.h"
-#include "QAtomicIntCompat.h"
#include <openssl/rand.h>
@@ -30,7 +29,7 @@ public:
void run() {
unsigned char buf[64];
- while (QAtomicIntLoad(*m_running) == 1) {
+ while (m_running->load() == 1) {
for (int i = 0; i < 1024; i++) {
if (m_seed) {
RAND_seed(buf, sizeof(buf));