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:
parent
3c74720f74
commit
67a9b95009
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user