QNativeIpcKey: improve operator==()

There is no need to check if lhs.d == rhs.d in the end of the function,
because we already have the same condition earlier.
If none of the previous conditions was true, we can just return false.

This commit amends 7a37083817.

Pick-to: 6.6
Change-Id: I06dca9b3dedf5895820685a6ded5363963e6fa3f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
This commit is contained in:
Ivan Solovev 2023-08-17 13:18:09 +02:00
parent 14cf4f7584
commit e6a36f21a3

View File

@ -170,7 +170,7 @@ private:
return true;
if (lhs.isSlowPath() && rhs.isSlowPath())
return compare_internal(lhs, rhs) == 0;
return lhs.d == rhs.d;
return false;
}
friend bool operator!=(const QNativeIpcKey &lhs, const QNativeIpcKey &rhs) noexcept
{