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/qdbusargument.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/qdbusargument.h')
-rw-r--r-- | src/dbus/qdbusargument.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dbus/qdbusargument.h b/src/dbus/qdbusargument.h index cf09543912..bf4a6e40e6 100644 --- a/src/dbus/qdbusargument.h +++ b/src/dbus/qdbusargument.h @@ -81,7 +81,7 @@ public: QDBusArgument &operator=(const QDBusArgument &other); ~QDBusArgument(); - void swap(QDBusArgument &other) noexcept { qSwap(d, other.d); } + void swap(QDBusArgument &other) noexcept { qt_ptr_swap(d, other.d); } // used for marshalling (Qt -> D-BUS) QDBusArgument &operator<<(uchar arg); |