From 9ba63d1460db41c219b638212b42476164fcfdff Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 24 Jul 2018 13:08:25 +0200 Subject: Update code style, fix compiler warnings - Use nullptr instead of NULL for better warnings in case of mistakes - Get rid of VLAs which are not in C++11 actually - Fix implicit signed <-> unsigned mismatches by adding checks and casts --- src/client/net/serverdiscovery.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/client/net/serverdiscovery.cpp') diff --git a/src/client/net/serverdiscovery.cpp b/src/client/net/serverdiscovery.cpp index 33ddbf5..799fcbe 100644 --- a/src/client/net/serverdiscovery.cpp +++ b/src/client/net/serverdiscovery.cpp @@ -145,12 +145,12 @@ void ServerDiscovery::onUdpReadyRead() while (_discoverySocket.hasPendingDatagrams()) { // Discard any packets if discovery is stopped if (!this->isActive()) { - _discoverySocket.readDatagram(NULL, 0); + _discoverySocket.readDatagram(nullptr, 0); continue; } const qint64 size = _discoverySocket.readDatagram(data, UDPBUFSIZ, &addr, &port); - if (size <= 0) //|| clientApp->connection() != NULL) // TODO CHECK + if (size <= 0) //|| clientApp->connection() != nullptr) // TODO CHECK continue; _packet.reset(); -- cgit v1.2.3-55-g7522