QVariant: use std::swap for swapping known type

Amends b1b0c2970e

Task-number: QTBUG-97601
Pick-to: 6.3 6.2
Change-Id: I5161360f10e052d21c91044b2c9bf4260467e585
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Fabian Kosmale 2022-02-23 14:11:01 +01:00
parent 055fd403c4
commit 3fd43fafba

View File

@ -235,7 +235,7 @@ class Q_CORE_EXPORT QVariant
{ other.d = Private(); }
QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_MOVE_AND_SWAP(QVariant)
inline void swap(QVariant &other) noexcept { qSwap(d, other.d); }
inline void swap(QVariant &other) noexcept { std::swap(d, other.d); }
int userType() const { return typeId(); }
int typeId() const { return metaType().id(); }