diff options
author | Ivan Solovev <[email protected]> | 2025-06-13 17:15:42 +0200 |
---|---|---|
committer | Ivan Solovev <[email protected]> | 2025-06-16 13:45:35 +0200 |
commit | c5baec255b743507d0a9707283ff3c4ca28c2a2d (patch) | |
tree | 83c521aa5d2a4fdc7137f609f3f75b030fd3ca67 | |
parent | ced8c7493ce552619da424b478dec71a2096f4bf (diff) |
qdbusintegrator_p.h: do not use qSwap()
Use std::swap() or member-swap() instead, because qSwap() is an overkill
when we know the types.
Pick-to: 6.10 6.9 6.8 6.5
Change-Id: Iec598dbc16cf594a00f3cb03f4621b76869f3a1c
Reviewed-by: Thiago Macieira <[email protected]>
-rw-r--r-- | src/dbus/qdbusintegrator_p.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dbus/qdbusintegrator_p.h b/src/dbus/qdbusintegrator_p.h index b0c349799ab..9c5fa1b061f 100644 --- a/src/dbus/qdbusintegrator_p.h +++ b/src/dbus/qdbusintegrator_p.h @@ -51,8 +51,8 @@ struct QDBusSlotCache void swap(Data &other) noexcept { - qSwap(slotIdx, other.slotIdx); - qSwap(metaTypes, other.metaTypes); + std::swap(slotIdx, other.slotIdx); + metaTypes.swap(other.metaTypes); } }; @@ -76,7 +76,7 @@ struct QDBusSlotCache Hash hash; - void swap(QDBusSlotCache &other) noexcept { qSwap(hash, other.hash); } + void swap(QDBusSlotCache &other) noexcept { hash.swap(other.hash); } }; Q_DECLARE_SHARED(QDBusSlotCache::Data) Q_DECLARE_SHARED(QDBusSlotCache) |