summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2022-05-11 17:21:48 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-05-16 17:15:46 +0000
commit791b5dc5974eba6916e865219fa82cf5eed30392 (patch)
treea8f55d6201a1aff6136e345aa3449fb2da57e4d8
parent1cb79dd8970c2efa265036bd816c250038bca171 (diff)
Qt3D: 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 Change-Id: I1f27dc458f2d57a71070e818583f2e90c82e600d Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> (cherry picked from commit 4a2928a658363365406735140236f89bfdd33981) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/render/texture/qtexturedataupdate.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/render/texture/qtexturedataupdate.h b/src/render/texture/qtexturedataupdate.h
index f222fd6ec..69715888f 100644
--- a/src/render/texture/qtexturedataupdate.h
+++ b/src/render/texture/qtexturedataupdate.h
@@ -65,7 +65,7 @@ public:
{ swap(other); return *this; }
~QTextureDataUpdate();
- void swap(QTextureDataUpdate &other) noexcept { qSwap(d_ptr, other.d_ptr); }
+ void swap(QTextureDataUpdate &other) noexcept { d_ptr.swap(other.d_ptr); }
int x() const;
int y() const;