initialize a member and initialize a boolean

one less valgrind warning and one cppcheck warning less

REVIEW: 107603
This commit is contained in:
Jaime Torres 2013-04-29 18:14:50 +02:00
parent 6dc64841a7
commit 4ec0f64ea3
2 changed files with 3 additions and 2 deletions

View file

@ -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);

View file

@ -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);