From 4ec0f64ea3e8f1430c300a6b4d283a14202d032b Mon Sep 17 00:00:00 2001 From: Jaime Torres Date: Mon, 29 Apr 2013 18:14:50 +0200 Subject: [PATCH] initialize a member and initialize a boolean one less valgrind warning and one cppcheck warning less REVIEW: 107603 --- kcmkwin/kwindesktop/desktopnameswidget.cpp | 1 + libkwineffects/anidata.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/kcmkwin/kwindesktop/desktopnameswidget.cpp b/kcmkwin/kwindesktop/desktopnameswidget.cpp index 81b14ad0dd..f7ea7f6fb9 100644 --- a/kcmkwin/kwindesktop/desktopnameswidget.cpp +++ b/kcmkwin/kwindesktop/desktopnameswidget.cpp @@ -33,6 +33,7 @@ namespace KWin DesktopNamesWidget::DesktopNamesWidget(QWidget *parent) : QWidget(parent) , m_maxDesktops(0) + , m_desktopConfig(0) { m_namesLayout = new QGridLayout; m_namesLayout->setMargin(0); diff --git a/libkwineffects/anidata.cpp b/libkwineffects/anidata.cpp index 09635b03d6..c1066ca045 100644 --- a/libkwineffects/anidata.cpp +++ b/libkwineffects/anidata.cpp @@ -84,8 +84,8 @@ static FPx2 fpx2(const QString &s, AnimationEffect::Attribute a) return FPx2(); } - bool forced_align = false; - if ((forced_align = floats.count() < 2)) + bool forced_align = (floats.count() < 2); + if (forced_align) f2 = f1; else { f2 = floats.at(1).toFloat(&ok);