diff --git a/plugins/channelrx/remotetcpsink/remotetcpsinksink.cpp b/plugins/channelrx/remotetcpsink/remotetcpsinksink.cpp index f3f8fc2dd..d5977e32b 100644 --- a/plugins/channelrx/remotetcpsink/remotetcpsinksink.cpp +++ b/plugins/channelrx/remotetcpsink/remotetcpsinksink.cpp @@ -643,9 +643,9 @@ void RemoteTCPSinkSink::applySettings(const RemoteTCPSinkSettings& settings, con if (initZLib && (m_settings.m_compression == RemoteTCPSinkSettings::ZLIB)) { // Intialise zlib compression - m_zStream.zalloc = Z_NULL; - m_zStream.zfree = Z_NULL; - m_zStream.opaque = Z_NULL; + m_zStream.zalloc = nullptr; + m_zStream.zfree = nullptr; + m_zStream.opaque = nullptr; m_zStream.data_type = Z_BINARY; int windowBits = log2(m_settings.m_blockSize); diff --git a/plugins/samplesource/remotetcpinput/remotetcpinput.h b/plugins/samplesource/remotetcpinput/remotetcpinput.h index a2c3831cc..5ef3ec9e7 100644 --- a/plugins/samplesource/remotetcpinput/remotetcpinput.h +++ b/plugins/samplesource/remotetcpinput/remotetcpinput.h @@ -138,7 +138,7 @@ public: private: QString m_filename; - MsgSaveReplay(const QString& filename) : + explicit MsgSaveReplay(const QString& filename) : Message(), m_filename(filename) { } diff --git a/plugins/samplesource/remotetcpinput/remotetcpinputtcphandler.cpp b/plugins/samplesource/remotetcpinput/remotetcpinputtcphandler.cpp index ad91f26d1..d383326b2 100644 --- a/plugins/samplesource/remotetcpinput/remotetcpinputtcphandler.cpp +++ b/plugins/samplesource/remotetcpinput/remotetcpinputtcphandler.cpp @@ -67,11 +67,11 @@ RemoteTCPInputTCPHandler::RemoteTCPInputTCPHandler(SampleSinkFifo *sampleFifo, D m_reconnectTimer.setSingleShot(true); // Initialise zlib decompressor - m_zStream.zalloc = Z_NULL; - m_zStream.zfree = Z_NULL; - m_zStream.opaque = Z_NULL; + m_zStream.zalloc = nullptr; + m_zStream.zfree = nullptr; + m_zStream.opaque = nullptr; m_zStream.avail_in = 0; - m_zStream.next_in = Z_NULL; + m_zStream.next_in = nullptr; if (Z_OK != inflateInit(&m_zStream)) { qDebug() << "RemoteTCPInputTCPHandler::RemoteTCPInputTCPHandler: inflateInit failed."; } @@ -2059,7 +2059,7 @@ void RemoteTCPInputTCPHandler::processDecompressedData(int requiredSamples) calcPower(reinterpret_cast(buf), len / 2); - m_sampleFifo->write((quint8 *) buf, len * sizeof(FixReal)); + m_sampleFifo->write(reinterpret_cast(buf), len * sizeof(FixReal)); } m_uncompressedData.read(uncompressedBytes); @@ -2216,13 +2216,13 @@ bool RemoteTCPInputTCPHandler::handleMessage(const Message& cmd) if (MsgConfigureTcpHandler::match(cmd)) { qDebug() << "RemoteTCPInputTCPHandler::handleMessage: MsgConfigureTcpHandler"; - MsgConfigureTcpHandler& notif = (MsgConfigureTcpHandler&) cmd; + const MsgConfigureTcpHandler& notif = (const MsgConfigureTcpHandler&) cmd; applySettings(notif.getSettings(), notif.getSettingsKeys(), notif.getForce()); return true; } else if (RemoteTCPInput::MsgSendMessage::match(cmd)) { - RemoteTCPInput::MsgSendMessage& msg = (RemoteTCPInput::MsgSendMessage&) cmd; + const RemoteTCPInput::MsgSendMessage& msg = (const RemoteTCPInput::MsgSendMessage&) cmd; sendMessage(MainCore::instance()->getSettings().getStationName(), msg.getText(), msg.getBroadcast());