diff options
author | Marc Mutz <marc.mutz@qt.io> | 2022-05-11 17:31:55 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2022-05-11 18:25:12 +0200 |
commit | e2160a4669d7d3d28b5c312a8ff6de49dc87a7b6 (patch) | |
tree | d525b35c18b6887a1f429aa8d5c6aa6ae14cce72 /src | |
parent | c9a6923080765a6deddf8e5038ace3276174cdec (diff) | |
download | qtwebsockets-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.h | 2 |
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); |