Remove unnecessary variable self-assignment

Assigning an int variable to itself is unnecessary and pointless, remove
them.

styles/qplastiquestyle.cpp:932:23: warning: explicitly assigning a
variable of type 'int' to itself [-Wself-assign]
                width = width;
                ~~~~~ ^ ~~~~~
styles/qplastiquestyle.cpp:939:23: warning: explicitly assigning a
variable of type 'int' to itself [-Wself-assign]
                width = width;
                ~~~~~ ^ ~~~~~

Change-Id: I0118874028bf43992bcce07f87b46b48868436cc
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
This commit is contained in:
Bradley T. Hughes 2011-11-08 18:01:49 +01:00 committed by Qt by Nokia
parent 3c74720f74
commit 67a9b95009

View File

@ -929,14 +929,12 @@ static QString elliditide(const QString &text, const QFontMetrics &fontMetrics,
int width = fontMetrics.width(leftHalf + ellipsis + rightHalf);
if (width < rect.width()) {
title = leftHalf + ellipsis + rightHalf;
width = width;
break;
}
rightHalf.remove(0, 1);
width = fontMetrics.width(leftHalf + ellipsis + rightHalf);
if (width < rect.width()) {
title = leftHalf + ellipsis + rightHalf;
width = width;
break;
}
}