summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2022-05-11 17:21:48 +0200
committerMarc Mutz <marc.mutz@qt.io>2022-05-16 15:17:05 +0000
commit4a2928a658363365406735140236f89bfdd33981 (patch)
tree86932ef9b2070a579dccd47b9a9962aa24ee5f82
parent2fd66d7311833fb833809b514d70436cc262c14e (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 Pick-to: 6.3 6.2 Change-Id: I1f27dc458f2d57a71070e818583f2e90c82e600d Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
-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;