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:04 +0100 |
commit | f438d29b6fdfff0680b09e88590ee47b22877776 (patch) | |
tree | df164dadcafe407a2c46b0439956036cd221472c /src/network/ssl/qsslcertificate.h | |
parent | 870bb22c17e5578ead427821998b9e62201f7b5d (diff) |
QtNetwork: 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
- 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: I26586da1f158fe6b18314abd8cf9bb040bc9cad1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/network/ssl/qsslcertificate.h')
-rw-r--r-- | src/network/ssl/qsslcertificate.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/ssl/qsslcertificate.h b/src/network/ssl/qsslcertificate.h index e8349d502b..94e784745b 100644 --- a/src/network/ssl/qsslcertificate.h +++ b/src/network/ssl/qsslcertificate.h @@ -97,7 +97,7 @@ public: QSslCertificate &operator=(const QSslCertificate &other); void swap(QSslCertificate &other) noexcept - { qSwap(d, other.d); } + { d.swap(other.d); } bool operator==(const QSslCertificate &other) const; inline bool operator!=(const QSslCertificate &other) const { return !operator==(other); } |