diff options
author | Marc Mutz <marc.mutz@qt.io> | 2022-03-15 21:20:46 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-03-17 22:01:04 +0000 |
commit | 79b9f32f088b907e0d895867b4360c14d2802359 (patch) | |
tree | ff64d81d90023c49e8a112925637ed1660b7aed8 /src/dbus/qdbusconnection.h | |
parent | 7e5229aa535c362ea44db1590d83274e26c1ded3 (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.
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>
(cherry picked from commit 870bb22c17e5578ead427821998b9e62201f7b5d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/dbus/qdbusconnection.h')
-rw-r--r-- | src/dbus/qdbusconnection.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dbus/qdbusconnection.h b/src/dbus/qdbusconnection.h index 43bc547894..1628c2bd7a 100644 --- a/src/dbus/qdbusconnection.h +++ b/src/dbus/qdbusconnection.h @@ -138,7 +138,7 @@ public: QDBusConnection &operator=(const QDBusConnection &other); ~QDBusConnection(); - void swap(QDBusConnection &other) noexcept { qSwap(d, other.d); } + void swap(QDBusConnection &other) noexcept { qt_ptr_swap(d, other.d); } bool isConnected() const; QString baseService() const; |