Rearrange QQuickPixmapKey operator==

...to do the comparisons in the same order as the variables are stored.

Change-Id: I5faa1daa84757b94993c3135ddfc9a3fd6c10ea6
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
This commit is contained in:
Shawn Rutledge 2020-02-14 16:41:28 +01:00
parent ee95f0e683
commit 55546991e2
1 changed files with 5 additions and 2 deletions

View File

@ -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)