From 1d372eddbe9e4eb75a0fcde4bdcdebcf75222075 Mon Sep 17 00:00:00 2001 From: Konstantin Ritt Date: Fri, 18 Apr 2014 16:10:00 +0300 Subject: 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 Reviewed-by: Jason McDonald --- src/testlib/qtest_gui.h | 4 ++-- 1 file 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", -- cgit v1.2.3