aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/Input/mpc/decoder_mpc.cpp
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2020-08-12 21:03:34 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2020-08-12 21:03:34 +0000
commit7ef8d11baeaf1847ba7f1df5d858f8cffea9300d (patch)
treea741fb49db8834efd4b46d760b89082547eb2a9d /src/plugins/Input/mpc/decoder_mpc.cpp
parent6f301f5880f7efce76ed46e7b502830642b87370 (diff)
downloadqmmp-7ef8d11baeaf1847ba7f1df5d858f8cffea9300d.tar.gz
qmmp-7ef8d11baeaf1847ba7f1df5d858f8cffea9300d.tar.bz2
qmmp-7ef8d11baeaf1847ba7f1df5d858f8cffea9300d.zip
coding style fixes
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@9470 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Input/mpc/decoder_mpc.cpp')
-rw-r--r--src/plugins/Input/mpc/decoder_mpc.cpp22
1 files changed, 7 insertions, 15 deletions
diff --git a/src/plugins/Input/mpc/decoder_mpc.cpp b/src/plugins/Input/mpc/decoder_mpc.cpp
index 22d721d27..63827c4a4 100644
--- a/src/plugins/Input/mpc/decoder_mpc.cpp
+++ b/src/plugins/Input/mpc/decoder_mpc.cpp
@@ -18,7 +18,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-
#include <QObject>
#include <QIODevice>
#include <qmmp/buffer.h>
@@ -30,44 +29,38 @@
static mpc_int32_t mpc_callback_read (mpc_reader *reader, void *buffer, mpc_int32_t size)
{
- DecoderMPC *dmpc = (DecoderMPC *) reader->data;
+ DecoderMPC *dmpc = static_cast<DecoderMPC *>(reader->data);
return dmpc->input()->read((char *)buffer, size);
}
static mpc_bool_t mpc_callback_seek (mpc_reader *reader, mpc_int32_t offset)
{
- DecoderMPC *dmpc = (DecoderMPC *) reader->data;
+ DecoderMPC *dmpc = static_cast<DecoderMPC *>(reader->data);
return dmpc->input()->seek(offset);
}
static mpc_int32_t mpc_callback_tell (mpc_reader *reader)
{
- DecoderMPC *dmpc = (DecoderMPC *) reader->data;
+ DecoderMPC *dmpc = static_cast<DecoderMPC *>(reader->data);
return dmpc->input()->pos ();
}
static mpc_bool_t mpc_callback_canseek (mpc_reader *reader)
{
- DecoderMPC *dmpc = (DecoderMPC *) reader->data;
+ DecoderMPC *dmpc = static_cast<DecoderMPC *>(reader->data);
return !dmpc->input()->isSequential () ;
}
static mpc_int32_t mpc_callback_get_size (mpc_reader *reader)
{
- DecoderMPC *dmpc = (DecoderMPC *) reader->data;
+ DecoderMPC *dmpc = static_cast<DecoderMPC *>(reader->data);
return dmpc->input()->size();
}
// Decoder class
-DecoderMPC::DecoderMPC(QIODevice *i)
- : Decoder(i)
-{
- m_len = 0;
- m_bitrate = 0;
- m_totalTime = 0.0;
- m_data = nullptr;
-}
+DecoderMPC::DecoderMPC(QIODevice *i) : Decoder(i)
+{}
DecoderMPC::~DecoderMPC()
{
@@ -164,5 +157,4 @@ qint64 DecoderMPC::read(unsigned char *audio, qint64 maxSize)
void DecoderMPC::seek(qint64 pos)
{
mpc_demux_seek_second(data()->demuxer, (double)pos/1000);
-
}