From e8d8657f64b8338cb89d989305b66f5daa8a9440 Mon Sep 17 00:00:00 2001 From: Dale Glass Date: Sun, 5 Jun 2022 13:19:06 +0200 Subject: [PATCH] Fix operator precedence warning --- libraries/networking/src/udt/NetworkSocket.cpp | 2 +- libraries/networking/src/webrtc/WebRTCDataChannels.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/networking/src/udt/NetworkSocket.cpp b/libraries/networking/src/udt/NetworkSocket.cpp index 7c7ab41ddb..179abe9f78 100644 --- a/libraries/networking/src/udt/NetworkSocket.cpp +++ b/libraries/networking/src/udt/NetworkSocket.cpp @@ -193,7 +193,7 @@ qint64 NetworkSocket::readDatagram(char* data, qint64 maxSize, SockAddr* sockAdd #if defined(WEBRTC_DATA_CHANNELS) // Read per preceding pendingDatagramSize() if any, otherwise alternate socket types. if (_pendingDatagramSizeSocketType == SocketType::UDP - || _pendingDatagramSizeSocketType == SocketType::Unknown && _lastSocketTypeRead == SocketType::WebRTC) { + || (_pendingDatagramSizeSocketType == SocketType::Unknown && _lastSocketTypeRead == SocketType::WebRTC)) { _lastSocketTypeRead = SocketType::UDP; _pendingDatagramSizeSocketType = SocketType::Unknown; if (sockAddr) { diff --git a/libraries/networking/src/webrtc/WebRTCDataChannels.cpp b/libraries/networking/src/webrtc/WebRTCDataChannels.cpp index 610afc4668..5da937c211 100644 --- a/libraries/networking/src/webrtc/WebRTCDataChannels.cpp +++ b/libraries/networking/src/webrtc/WebRTCDataChannels.cpp @@ -508,8 +508,8 @@ void WebRTCDataChannels::onSignalingMessage(const QJsonObject& message) { auto data = message.value("data").isObject() ? message.value("data").toObject() : QJsonObject(); auto from = message.value("from").toString(); auto to = NodeType::fromChar(message.value("to").toString().at(0)); - if (!DATA_CHANNEL_ID_REGEX.match(from).hasMatch() || to == NodeType::Unassigned - || !data.contains("description") && !data.contains("candidate")) { + if (!DATA_CHANNEL_ID_REGEX.match(from).hasMatch() || to == NodeType::Unassigned + || (!data.contains("description") && !data.contains("candidate"))) { qCWarning(networking_webrtc) << "Invalid or unexpected signaling message:" << QJsonDocument(message).toJson(QJsonDocument::Compact).left(MAX_DEBUG_DETAIL_LENGTH); return;