diff options
author | Konstantin Ritt <ritt.ks@gmail.com> | 2014-04-18 16:10:00 +0300 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-04-26 09:10:03 +0200 |
commit | 1d372eddbe9e4eb75a0fcde4bdcdebcf75222075 (patch) | |
tree | 723cce5f4e28c2e75544d00b7bef9b624e3d65bf | |
parent | 8ddf76989c80896d4cd1e759bbd2594609eebf6d (diff) |
Fix identical sub-expressions in comparison
Found by static analyzer (see http://www.viva64.com/en/b/0251/).
Change-Id: I611def790a98abf7574e96e6039f10714316d81e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jason McDonald <macadder1@gmail.com>
-rw-r--r-- | src/testlib/qtest_gui.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/testlib/qtest_gui.h b/src/testlib/qtest_gui.h index a9ac7777c3..7c68b0fd77 100644 --- a/src/testlib/qtest_gui.h +++ b/src/testlib/qtest_gui.h @@ -98,7 +98,7 @@ inline bool qCompare(QImage const &t1, QImage const &t2, } if (t1Null && t2Null) return compare_helper(true, 0, 0, 0, actual, expected, file, line); - if (t1.width() != t2.width() || t2.height() != t2.height()) { + if (t1.width() != t2.width() || t1.height() != t2.height()) { qsnprintf(msg, 1024, "Compared QImages differ in size.\n" " Actual (%s): %dx%d\n" " Expected (%s): %dx%d", @@ -132,7 +132,7 @@ inline bool qCompare(QPixmap const &t1, QPixmap const &t2, const char *actual, c } if (t1Null && t2Null) return compare_helper(true, 0, 0, 0, actual, expected, file, line); - if (t1.width() != t2.width() || t2.height() != t2.height()) { + if (t1.width() != t2.width() || t1.height() != t2.height()) { qsnprintf(msg, 1024, "Compared QPixmaps differ in size.\n" " Actual (%s): %dx%d\n" " Expected (%s): %dx%d", |