QRestReply: use qt_ptr_swap instead of std::swap

qt_ptr_swap is our swap compile-time optimizer. It's faster because it
hardcodes noexcept(true) and std::swap() must calculate it.

Amends 9ba5c7ff6aa42c5701cf950d2137467a2d178833.

Change-Id: I1b5a326276bd30638ac9b6dcf597abb5e53ada00
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit f70e113b2e895fb71db4ee6fb77a91f65e2deae9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Marc Mutz 2024-02-29 11:46:11 +01:00 committed by Qt Cherry-pick Bot
parent c5bf202f21
commit c3ec6c8a53

View File

@ -35,7 +35,7 @@ public:
void swap(QRestReply &other) noexcept
{
wrapped.swap(other.wrapped);
std::swap(d, other.d);
qt_ptr_swap(d, other.d);
}
Q_NETWORK_EXPORT QNetworkReply *networkReply() const;