summaryrefslogtreecommitdiffstats
path: root/src/serialbus/qcanbusdeviceinfo.h
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2022-05-11 17:18:34 +0200
committerMarc Mutz <marc.mutz@qt.io>2022-05-11 18:25:01 +0200
commitfe7cd7255f82b3884651045422192bd7960cb0be (patch)
treec7e45739cec415879db0b917d7b9e30dd4f95476 /src/serialbus/qcanbusdeviceinfo.h
parent7df79c0d460409faccae29eeeda05ca38cf205a4 (diff)
QtSerialBus: replace qSwap with std::member-swap where possible
qSwap() is a monster that looks for ADL overloads of swap() and also detects the noexcept of the wrapped swap() function, so it should only be used when the argument type is unknown. In the vast majority of cases, the type is known to be efficiently std::swap()able or to have a member-swap. Call either of these. Task-number: QTBUG-97601 Pick-to: 6.3 6.2 5.15 Change-Id: I89336e147d12e6d6563fab2e76f5ae7eec4ff220 Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/serialbus/qcanbusdeviceinfo.h')
-rw-r--r--src/serialbus/qcanbusdeviceinfo.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/serialbus/qcanbusdeviceinfo.h b/src/serialbus/qcanbusdeviceinfo.h
index 9503b0f..7b80400 100644
--- a/src/serialbus/qcanbusdeviceinfo.h
+++ b/src/serialbus/qcanbusdeviceinfo.h
@@ -57,7 +57,7 @@ public:
void swap(QCanBusDeviceInfo &other) noexcept
{
- qSwap(d_ptr, other.d_ptr);
+ d_ptr.swap(other.d_ptr);
}
QCanBusDeviceInfo &operator=(const QCanBusDeviceInfo &other);