From c839efb07a6aa3b487dac5f86f905f35ef2c3a08 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Tue, 15 Mar 2022 21:20:46 +0100 Subject: QtGui: compile-optimize inline swap functions Instead of using the overly-generic qSwap() monster, use - qt_ptr_swap() for swapping raw pointers - member-swap for swapping smart pointers - std::swap() for swapping scalars In QtCore, this has proven to give a nice reduction in compile time for Qt users, cf. b1b0c2970e480ef460a61f37fa430dc443390358. Pick-to: 6.3 6.2 Task-number: QTBUG-97601 Change-Id: I987ff95e8751a22a4f283655d8225dd16de21178 Reviewed-by: Thiago Macieira Reviewed-by: Qt CI Bot Reviewed-by: Volker Hilsheimer --- src/gui/kernel/qeventpoint.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui/kernel/qeventpoint.h') diff --git a/src/gui/kernel/qeventpoint.h b/src/gui/kernel/qeventpoint.h index fbcdc20193..1e4eca040d 100644 --- a/src/gui/kernel/qeventpoint.h +++ b/src/gui/kernel/qeventpoint.h @@ -102,7 +102,7 @@ public: bool operator!=(const QEventPoint &other) const noexcept { return !operator==(other); } ~QEventPoint(); inline void swap(QEventPoint &other) noexcept - { qSwap(d, other.d); } + { d.swap(other.d); } QPointF position() const; QPointF pressPosition() const; -- cgit v1.2.3