From 7ef8d11baeaf1847ba7f1df5d858f8cffea9300d Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Wed, 12 Aug 2020 21:03:34 +0000 Subject: coding style fixes git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@9470 90c681e8-e032-0410-971d-27865f9a5e38 --- src/plugins/Input/opus/decoder_opus.cpp | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'src/plugins/Input/opus/decoder_opus.cpp') diff --git a/src/plugins/Input/opus/decoder_opus.cpp b/src/plugins/Input/opus/decoder_opus.cpp index 5a6ffdb78..0f6cca847 100644 --- a/src/plugins/Input/opus/decoder_opus.cpp +++ b/src/plugins/Input/opus/decoder_opus.cpp @@ -27,13 +27,13 @@ // ic functions for libopusfile static int opusread (void *src, unsigned char *buf,int size) { - DecoderOpus *d = (DecoderOpus *) src; + DecoderOpus *d = static_cast(src); return d->input()->read((char *) buf, size); } static int opusseek(void *src, opus_int64 offset, int whence) { - DecoderOpus *d = (DecoderOpus *) src; + DecoderOpus *d = static_cast(src); if (d->input()->isSequential()) return -1; long start = 0; @@ -57,21 +57,16 @@ static int opusseek(void *src, opus_int64 offset, int whence) return -1; } -static opus_int64 opustell(void *src) +static opus_int64 opustell(void *src) { - DecoderOpus *dogg = (DecoderOpus *) src; - return (long) dogg->input()->pos(); + DecoderOpus *d = static_cast(src); + return (opus_int64)d->input()->pos(); } // Decoder class -DecoderOpus::DecoderOpus(const QString &url, QIODevice *i) : Decoder(i) -{ - m_totalTime = 0; - m_opusfile = nullptr; - m_chan = 0; - m_bitrate = 0; - m_url = url; -} +DecoderOpus::DecoderOpus(const QString &url, QIODevice *i) : Decoder(i), + m_url(url) +{} DecoderOpus::~DecoderOpus() { -- cgit v1.2.3-13-gbd6f