summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qimage.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/image/qimage.h')
-rw-r--r--src/gui/image/qimage.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gui/image/qimage.h b/src/gui/image/qimage.h
index 89a696d5d6..d00c11b669 100644
--- a/src/gui/image/qimage.h
+++ b/src/gui/image/qimage.h
@@ -125,13 +125,12 @@ public:
QImage(const QImage &);
inline QImage(QImage &&other) noexcept
- : QPaintDevice(), d(nullptr)
- { qSwap(d, other.d); }
+ : QPaintDevice(), d(qExchange(other.d, nullptr))
+ {}
~QImage();
QImage &operator=(const QImage &);
- inline QImage &operator=(QImage &&other) noexcept
- { qSwap(d, other.d); return *this; }
+ QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_MOVE_AND_SWAP(QImage)
inline void swap(QImage &other) noexcept
{ qSwap(d, other.d); }