From feda3e7673137c3f6a9f3561276b6d21447fd881 Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Mon, 26 Oct 2020 16:34:20 +0100 Subject: Make QRect(F) and QMargins comparison operators hidden friends Hide them from ADL to reduce noise. QRect operators were already implemented as hidden friends, but a left-over declaration un-hid them again. Use the opportunity to simplify QMargins::operator!= by just inverting operator==. No need to spell things out, the compiler can do that for us. Change-Id: I55722223a2267cbeba5726dc912b48d6e017e580 Reviewed-by: Allan Sandfeld Jensen --- src/corelib/tools/qrect.h | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src/corelib/tools/qrect.h') diff --git a/src/corelib/tools/qrect.h b/src/corelib/tools/qrect.h index 23ace7d42d..14cab1137e 100644 --- a/src/corelib/tools/qrect.h +++ b/src/corelib/tools/qrect.h @@ -166,9 +166,6 @@ private: }; Q_DECLARE_TYPEINFO(QRect, Q_MOVABLE_TYPE); -constexpr inline bool operator==(const QRect &, const QRect &) noexcept; -constexpr inline bool operator!=(const QRect &, const QRect &) noexcept; - /***************************************************************************** QRect stream functions @@ -630,9 +627,6 @@ private: }; Q_DECLARE_TYPEINFO(QRectF, Q_MOVABLE_TYPE); -constexpr inline bool operator==(const QRectF &, const QRectF &) noexcept; -constexpr inline bool operator!=(const QRectF &, const QRectF &) noexcept; - /***************************************************************************** QRectF stream functions -- cgit v1.2.3