From 55546991e24ca6799709cbe0171b9ab87216c35f Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Fri, 14 Feb 2020 16:41:28 +0100 Subject: [PATCH] Rearrange QQuickPixmapKey operator== ...to do the comparisons in the same order as the variables are stored. Change-Id: I5faa1daa84757b94993c3135ddfc9a3fd6c10ea6 Reviewed-by: Shawn Rutledge --- src/quick/util/qquickpixmapcache.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/quick/util/qquickpixmapcache.cpp b/src/quick/util/qquickpixmapcache.cpp index 6a34169fce..8846edcd44 100644 --- a/src/quick/util/qquickpixmapcache.cpp +++ b/src/quick/util/qquickpixmapcache.cpp @@ -1026,8 +1026,11 @@ public: inline bool operator==(const QQuickPixmapKey &lhs, const QQuickPixmapKey &rhs) { - return *lhs.region == *rhs.region && *lhs.size == *rhs.size && *lhs.url == *rhs.url && - lhs.options == rhs.options && lhs.frame == rhs.frame; + return *lhs.url == *rhs.url && + *lhs.region == *rhs.region && + *lhs.size == *rhs.size && + lhs.frame == rhs.frame && + lhs.options == rhs.options; } inline uint qHash(const QQuickPixmapKey &key)