diff options
author | Marc Mutz <marc.mutz@qt.io> | 2022-03-15 21:20:46 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2022-03-17 07:15:01 +0100 |
commit | 870bb22c17e5578ead427821998b9e62201f7b5d (patch) | |
tree | 87e1545b5faee9013338c1ba37894b19d0001616 /src/dbus/qdbuspendingcall.h | |
parent | 9f8da21239a4d9e22a2d5633920c36af4eb4a6c7 (diff) |
QtDBus: 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 and owning containers
- 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: I2cb0dd3cef3a2923e7d08bb9d93c692308797e5b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/dbus/qdbuspendingcall.h')
-rw-r--r-- | src/dbus/qdbuspendingcall.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dbus/qdbuspendingcall.h b/src/dbus/qdbuspendingcall.h index dd99346301..727b038c77 100644 --- a/src/dbus/qdbuspendingcall.h +++ b/src/dbus/qdbuspendingcall.h @@ -63,7 +63,7 @@ public: QDBusPendingCall &operator=(QDBusPendingCall &&other) noexcept { swap(other); return *this; } QDBusPendingCall &operator=(const QDBusPendingCall &other); - void swap(QDBusPendingCall &other) noexcept { qSwap(d, other.d); } + void swap(QDBusPendingCall &other) noexcept { d.swap(other.d); } #ifndef Q_CLANG_QDOC // pretend that they aren't here |