QHash: optimize equality operator
- First compare the d-pointer before dipping into *d
- Keep a running count as we calculate thisEqualRange, as std::distance() on QHash::iterator is very expensive.
- Skip the pointless first comparison of the unadvanced iterator's key() with itself (found by Mårten Nordheim)
Also rename (it, thisEqualRangeEnd) → (thisEqualRangeStart, it),
to keep advancing it, which is more natural than advancing
an end and later resetting it = end.
Reviewed-by: Mårten Nordheim <email@example.com>
Reviewed-by: Volker Hilsheimer <firstname.lastname@example.org>