summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2022-05-11 17:31:55 +0200
committerMarc Mutz <marc.mutz@qt.io>2022-05-11 18:25:12 +0200
commite2160a4669d7d3d28b5c312a8ff6de49dc87a7b6 (patch)
treed525b35c18b6887a1f429aa8d5c6aa6ae14cce72 /src
parentc9a6923080765a6deddf8e5038ace3276174cdec (diff)
downloadqtwebsockets-e2160a4669d7d3d28b5c312a8ff6de49dc87a7b6.tar.gz
QtWebSockets: replace qSwap with 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: If9c28df7d788856fb1653d2fae2a68ff42a12b23 Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/websockets/qwebsockethandshakeoptions.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/websockets/qwebsockethandshakeoptions.h b/src/websockets/qwebsockethandshakeoptions.h
index 0991a76..376aba2 100644
--- a/src/websockets/qwebsockethandshakeoptions.h
+++ b/src/websockets/qwebsockethandshakeoptions.h
@@ -61,7 +61,7 @@ public:
QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_PURE_SWAP(QWebSocketHandshakeOptions)
QWebSocketHandshakeOptions &operator=(const QWebSocketHandshakeOptions &other);
- void swap(QWebSocketHandshakeOptions &other) noexcept { qSwap(d, other.d); }
+ void swap(QWebSocketHandshakeOptions &other) noexcept { d.swap(other.d); }
QStringList subprotocols() const;
void setSubprotocols(const QStringList &protocols);