aboutsummaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2016-10-29 16:45:19 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2016-10-29 16:45:19 +0000
commit9597e224068505196d6802f05edc6d182a69cd4b (patch)
tree36fde9e2a7ce9a8bb903ee2c3fb7e73dd4a744fe /src/plugins
parentd6d77d7629e743b0de89c5f5afbaec6e3e16b7fa (diff)
downloadqmmp-9597e224068505196d6802f05edc6d182a69cd4b.tar.gz
qmmp-9597e224068505196d6802f05edc6d182a69cd4b.tar.bz2
qmmp-9597e224068505196d6802f05edc6d182a69cd4b.zip
some optimizations
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@6815 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/General/converter/converter.cpp1
-rw-r--r--src/plugins/General/scrobbler/scrobblercache.cpp5
-rw-r--r--src/plugins/General/scrobbler/scrobblercache.h4
-rw-r--r--src/plugins/Input/cdaudio/decoder_cdaudio.cpp5
-rw-r--r--src/plugins/Input/flac/decoder_flac.cpp1
-rw-r--r--src/plugins/Input/wavpack/decoder_wavpack.cpp2
-rw-r--r--src/plugins/Output/alsa/settingsdialog.cpp3
-rw-r--r--src/plugins/Ui/skinned/windowsystem.cpp9
8 files changed, 13 insertions, 17 deletions
diff --git a/src/plugins/General/converter/converter.cpp b/src/plugins/General/converter/converter.cpp
index cf6f8947e..de7aafe41 100644
--- a/src/plugins/General/converter/converter.cpp
+++ b/src/plugins/General/converter/converter.cpp
@@ -40,6 +40,7 @@ Converter::Converter(QObject *parent) : QObject(parent), QRunnable()
m_user_stop = false;
m_decoder = 0;
m_input = 0;
+ m_row = -1;
}
Converter::~Converter()
diff --git a/src/plugins/General/scrobbler/scrobblercache.cpp b/src/plugins/General/scrobbler/scrobblercache.cpp
index 054b6ba75..0144aefa2 100644
--- a/src/plugins/General/scrobbler/scrobblercache.cpp
+++ b/src/plugins/General/scrobbler/scrobblercache.cpp
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2013 by Ilya Kotov *
+ * Copyright (C) 2013-2016 by Ilya Kotov *
* forkotov02@hotmail.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -42,11 +42,12 @@ SongInfo::SongInfo(const SongInfo &other)
SongInfo::~SongInfo()
{}
-void SongInfo::operator=(const SongInfo &info)
+SongInfo & SongInfo::operator=(const SongInfo &info)
{
m_metadata = info.metaData();
m_length = info.length();
m_start_ts = info.timeStamp();
+ return *this;
}
bool SongInfo::operator==(const SongInfo &info)
diff --git a/src/plugins/General/scrobbler/scrobblercache.h b/src/plugins/General/scrobbler/scrobblercache.h
index 40ac5fff6..ae0494e96 100644
--- a/src/plugins/General/scrobbler/scrobblercache.h
+++ b/src/plugins/General/scrobbler/scrobblercache.h
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2013 by Ilya Kotov *
+ * Copyright (C) 2013-2016 by Ilya Kotov *
* forkotov02@hotmail.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -38,7 +38,7 @@ public:
~SongInfo();
- void operator=(const SongInfo &info);
+ SongInfo & operator=(const SongInfo &info);
bool operator==(const SongInfo &info);
bool operator!=(const SongInfo &info);
diff --git a/src/plugins/Input/cdaudio/decoder_cdaudio.cpp b/src/plugins/Input/cdaudio/decoder_cdaudio.cpp
index 9fa35dbd5..66c753832 100644
--- a/src/plugins/Input/cdaudio/decoder_cdaudio.cpp
+++ b/src/plugins/Input/cdaudio/decoder_cdaudio.cpp
@@ -129,6 +129,8 @@ QList <CDATrack> DecoderCDAudio::generateTrackList(const QString &device)
return tracks;
}
qDebug("DecoderCDAudio: found cd audio capable drive \"%s\"", *cd_drives);
+ device_path = QString(*cd_drives);
+ cdio_free_device_list(cd_drives); //free device list
}
else
{
@@ -136,9 +138,6 @@ QList <CDATrack> DecoderCDAudio::generateTrackList(const QString &device)
cdio_free_device_list(cd_drives);
return tracks;
}
- device_path = QString(*cd_drives);
- if (cd_drives && *cd_drives) //free device list
- cdio_free_device_list(cd_drives);
}
else
{
diff --git a/src/plugins/Input/flac/decoder_flac.cpp b/src/plugins/Input/flac/decoder_flac.cpp
index 43e0a7972..a848a12ea 100644
--- a/src/plugins/Input/flac/decoder_flac.cpp
+++ b/src/plugins/Input/flac/decoder_flac.cpp
@@ -230,7 +230,6 @@ static void flac_callback_error (const FLAC__StreamDecoder *,
DecoderFLAC::DecoderFLAC(const QString &path, QIODevice *i)
: Decoder(i)
{
- m_data = 0;
m_path = path;
m_data = new flac_data;
m_data->decoder = NULL;
diff --git a/src/plugins/Input/wavpack/decoder_wavpack.cpp b/src/plugins/Input/wavpack/decoder_wavpack.cpp
index 9a6a18c1f..4467b6ebb 100644
--- a/src/plugins/Input/wavpack/decoder_wavpack.cpp
+++ b/src/plugins/Input/wavpack/decoder_wavpack.cpp
@@ -41,12 +41,12 @@ DecoderWavPack::DecoderWavPack(const QString &path)
m_context = 0;
m_parser = 0;
m_output_buf = 0;
- m_parser = 0;
m_length_in_bytes = 0;
m_totalBytes = 0;
m_frame_size = 0;
m_offset = 0;
m_bps = 0;
+ m_track = 0;
}
DecoderWavPack::~DecoderWavPack()
diff --git a/src/plugins/Output/alsa/settingsdialog.cpp b/src/plugins/Output/alsa/settingsdialog.cpp
index ea4d6945e..b30640000 100644
--- a/src/plugins/Output/alsa/settingsdialog.cpp
+++ b/src/plugins/Output/alsa/settingsdialog.cpp
@@ -190,11 +190,10 @@ void SettingsDialog::getCardDevices(int card)
void SettingsDialog::getMixerDevices(QString card)
{
ui.mixerDeviceComboBox->clear();
- int err;
snd_mixer_t *mixer;
snd_mixer_elem_t *current;
- if ((err = getMixer(&mixer, card)) < 0)
+ if (getMixer(&mixer, card) < 0)
return;
current = snd_mixer_first_elem(mixer);
diff --git a/src/plugins/Ui/skinned/windowsystem.cpp b/src/plugins/Ui/skinned/windowsystem.cpp
index b29548fd6..4fb1aec1e 100644
--- a/src/plugins/Ui/skinned/windowsystem.cpp
+++ b/src/plugins/Ui/skinned/windowsystem.cpp
@@ -1,7 +1,7 @@
/***************************************************************************
* Based on Licq *
* Copyright (C) 2006-2009 Licq developers *
- * Copyright (C) 2011-2015 Ilya Kotov *
+ * Copyright (C) 2011-2016 Ilya Kotov *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
@@ -65,16 +65,13 @@ QString WindowSystem::netWindowManagerName()
Display* dsp = QX11Info::display();
WId root = DefaultRootWindow(dsp);
- unsigned char* retValue1 = NULL;
- unsigned char* retValue2 = NULL;
-
- retValue1 = getWindowProperty(root, "_NET_SUPPORTING_WM_CHECK");
+ unsigned char* retValue1 = getWindowProperty(root, "_NET_SUPPORTING_WM_CHECK");
if (retValue1 == NULL)
return QString();
WId win = *(reinterpret_cast<unsigned long*>(retValue1));
- retValue2 = getWindowProperty(win, "_NET_SUPPORTING_WM_CHECK");
+ unsigned char* retValue2 = getWindowProperty(win, "_NET_SUPPORTING_WM_CHECK");
if (retValue2 == NULL)
{
XFree(retValue1);