aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/Ui/skinned/shadedvisual.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/Ui/skinned/shadedvisual.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/Ui/skinned/shadedvisual.cpp')
-rw-r--r--src/plugins/Ui/skinned/shadedvisual.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/plugins/Ui/skinned/shadedvisual.cpp b/src/plugins/Ui/skinned/shadedvisual.cpp
index 3a195d4e5..3016a2b0d 100644
--- a/src/plugins/Ui/skinned/shadedvisual.cpp
+++ b/src/plugins/Ui/skinned/shadedvisual.cpp
@@ -34,7 +34,6 @@ ShadedVisual::ShadedVisual(QWidget *parent) : Visual(parent)
m_timer = new QTimer(this);
connect(m_timer, SIGNAL (timeout()), this, SLOT (timeout()));
connect(m_skin, SIGNAL(skinChanged()), this, SLOT(updateSkin()));
- m_running = false;
m_timer->setInterval(50);
m_timer->start();
clear();
@@ -84,21 +83,17 @@ void ShadedVisual::process ()
int pos = 0;
int l = 0;
int r = 0;
- int j_l = 0, j_r = 0;
for (int i = 0; i < 75; ++i)
{
pos += step;
- j_l = abs(m_left_buffer[pos >> 8] * 8.0);
-
- if (j_l > 15)
- j_l = 15;
+ int j_l = abs(m_left_buffer[pos >> 8] * 8.0);
+ j_l = qMin(j_l, 15);
l = qMax(l, j_l);
- j_r = abs(m_right_buffer[pos >> 8] * 8.0);
- if (j_r > 15)
- j_r = 15;
+ int j_r = abs(m_right_buffer[pos >> 8] * 8.0);
+ j_r = qMin(j_r, 15);
r = qMax(r, j_r);
}
m_l -= 0.5;