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>
This commit is contained in:
parent
8ddf76989c
commit
1d372eddbe
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user