summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qregion.h
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2022-03-15 21:20:46 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-03-19 16:32:21 +0000
commitf36a013be529b32a0f1b8e2fffb3153609f15ccd (patch)
tree6b5e01974c3bda3229436b4e052664527799c639 /src/gui/painting/qregion.h
parent874687902df20f0fdd0b39d84ffd89e6668e1088 (diff)
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. Task-number: QTBUG-97601 Change-Id: I987ff95e8751a22a4f283655d8225dd16de21178 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit c839efb07a6aa3b487dac5f86f905f35ef2c3a08) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/gui/painting/qregion.h')
-rw-r--r--src/gui/painting/qregion.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/painting/qregion.h b/src/gui/painting/qregion.h
index 12a3a4e502..ab4c2112ad 100644
--- a/src/gui/painting/qregion.h
+++ b/src/gui/painting/qregion.h
@@ -75,7 +75,7 @@ public:
~QRegion();
QRegion &operator=(const QRegion &);
QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_PURE_SWAP(QRegion)
- inline void swap(QRegion &other) noexcept { qSwap(d, other.d); }
+ void swap(QRegion &other) noexcept { qt_ptr_swap(d, other.d); }
bool isEmpty() const;
bool isNull() const;