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 7a370838177e581c8a9342808ba86e081951a41c.

Change-Id: I06dca9b3dedf5895820685a6ded5363963e6fa3f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit e6a36f21a3c44943afc8c60b9dc2e40976fcdb49)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Ivan Solovev 2023-08-17 13:18:09 +02:00 committed by Qt Cherry-pick Bot
parent 8ab0d1e9e8
commit 82e189441e

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
{