From 67a9b9500929ab9de0802e2236d5e158c151029d Mon Sep 17 00:00:00 2001 From: "Bradley T. Hughes" Date: Tue, 8 Nov 2011 18:01:49 +0100 Subject: 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 --- src/widgets/styles/qplastiquestyle.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/widgets') diff --git a/src/widgets/styles/qplastiquestyle.cpp b/src/widgets/styles/qplastiquestyle.cpp index 278ec2b9cb..799bc95fdd 100644 --- a/src/widgets/styles/qplastiquestyle.cpp +++ b/src/widgets/styles/qplastiquestyle.cpp @@ -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; } } -- cgit v1.2.3