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/qdbusmessage.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/qdbusmessage.h')
-rw-r--r-- | src/dbus/qdbusmessage.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dbus/qdbusmessage.h b/src/dbus/qdbusmessage.h index e820b2427b..af467c8a88 100644 --- a/src/dbus/qdbusmessage.h +++ b/src/dbus/qdbusmessage.h @@ -71,7 +71,7 @@ public: QDBusMessage &operator=(const QDBusMessage &other); ~QDBusMessage(); - void swap(QDBusMessage &other) noexcept { qSwap(d_ptr, other.d_ptr); } + void swap(QDBusMessage &other) noexcept { qt_ptr_swap(d_ptr, other.d_ptr); } static QDBusMessage createSignal(const QString &path, const QString &interface, const QString &name); |