diff options
| author | Jonah BrĂ¼chert <jbb.prv@gmx.de> | 2019-05-10 22:31:48 +0200 |
|---|---|---|
| committer | LNJ <lnj@kaidan.im> | 2019-09-08 14:07:00 +0200 |
| commit | b18a57daa33f0fefa5f4c63aa7f448b48d302e0d (patch) | |
| tree | 8682c7ea44b834a2910035049238e8628db552a0 /src/base/QXmppRtpChannel.cpp | |
| parent | 35256b7d95374717905f8ac8d4d524c4b691389e (diff) | |
| download | qxmpp-b18a57daa33f0fefa5f4c63aa7f448b48d302e0d.tar.gz | |
Modernize codebase using clang-tidy
Using the following checks:
* modernize-use-nullptr
* modernize-use-override
* modernize-use-using
* modernize-use-bool-literals
Diffstat (limited to 'src/base/QXmppRtpChannel.cpp')
| -rw-r--r-- | src/base/QXmppRtpChannel.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/base/QXmppRtpChannel.cpp b/src/base/QXmppRtpChannel.cpp index 61bf10f7..f80c7c4d 100644 --- a/src/base/QXmppRtpChannel.cpp +++ b/src/base/QXmppRtpChannel.cpp @@ -213,12 +213,12 @@ QXmppRtpAudioChannelPrivate::QXmppRtpAudioChannelPrivate() , incomingMaximum(0) , incomingPos(0) , incomingSequence(0) - , outgoingCodec(0) + , outgoingCodec(nullptr) , outgoingMarker(true) , outgoingPayloadNumbered(false) , outgoingSequence(1) , outgoingStamp(0) - , outgoingTimer(0) + , outgoingTimer(nullptr) { qRegisterMetaType<QXmppRtpAudioChannel::Tone>("QXmppRtpAudioChannel::Tone"); } @@ -240,7 +240,7 @@ QXmppCodec *QXmppRtpAudioChannelPrivate::codecForPayloadType(const QXmppJinglePa else if (payloadType.name().toLower() == "opus") return new QXmppOpusCodec(payloadType.clockrate(), payloadType.channels()); #endif - return 0; + return nullptr; } /// Constructs a new RTP audio channel with the given \a parent. @@ -349,7 +349,7 @@ void QXmppRtpAudioChannel::datagramReceived(const QByteArray &ba) d->incomingSequence = packet.sequence(); // get or create codec - QXmppCodec *codec = 0; + QXmppCodec *codec = nullptr; const quint8 packetType = packet.type(); if (!d->incomingCodecs.contains(packetType)) { foreach (const QXmppJinglePayloadType &payload, m_incomingPayloadTypes) { @@ -497,7 +497,7 @@ void QXmppRtpAudioChannel::payloadTypesChanged() // delete outgoing codec if (d->outgoingCodec) { delete d->outgoingCodec; - d->outgoingCodec = 0; + d->outgoingCodec = nullptr; } // create outgoing codec @@ -797,7 +797,7 @@ public: }; QXmppRtpVideoChannelPrivate::QXmppRtpVideoChannelPrivate() - : encoder(0), + : encoder(nullptr), outgoingId(0), outgoingSequence(1), outgoingStamp(0) @@ -925,7 +925,7 @@ void QXmppRtpVideoChannel::payloadTypesChanged() delete decoder; d->decoders.clear(); foreach (const QXmppJinglePayloadType &payload, m_incomingPayloadTypes) { - QXmppVideoDecoder *decoder = 0; + QXmppVideoDecoder *decoder = nullptr; if (false) {} #ifdef QXMPP_USE_THEORA @@ -945,10 +945,10 @@ void QXmppRtpVideoChannel::payloadTypesChanged() // refresh encoder if (d->encoder) { delete d->encoder; - d->encoder = 0; + d->encoder = nullptr; } foreach (const QXmppJinglePayloadType &payload, m_outgoingPayloadTypes) { - QXmppVideoEncoder *encoder = 0; + QXmppVideoEncoder *encoder = nullptr; if (false) {} #ifdef QXMPP_USE_THEORA |
