summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/painting')
-rw-r--r--src/gui/painting/qmatrix.h4
-rw-r--r--src/gui/painting/qtransform.h6
2 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/painting/qmatrix.h b/src/gui/painting/qmatrix.h
index 74ecef767e..d8a4fcfb1c 100644
--- a/src/gui/painting/qmatrix.h
+++ b/src/gui/painting/qmatrix.h
@@ -65,10 +65,10 @@ public:
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
// ### Qt 6: remove; the compiler-generated ones are fine!
QMatrix &operator=(QMatrix &&other) Q_DECL_NOTHROW // = default
- { memcpy(this, &other, sizeof(QMatrix)); return *this; }
+ { memcpy(static_cast<void *>(this), static_cast<void *>(&other), sizeof(QMatrix)); return *this; }
QMatrix &operator=(const QMatrix &) Q_DECL_NOTHROW; // = default
QMatrix(QMatrix &&other) Q_DECL_NOTHROW // = default
- { memcpy(this, &other, sizeof(QMatrix)); }
+ { memcpy(static_cast<void *>(this), static_cast<void *>(&other), sizeof(QMatrix)); }
QMatrix(const QMatrix &other) Q_DECL_NOTHROW; // = default
#endif
diff --git a/src/gui/painting/qtransform.h b/src/gui/painting/qtransform.h
index 79835b36e2..63c4a241c1 100644
--- a/src/gui/painting/qtransform.h
+++ b/src/gui/painting/qtransform.h
@@ -78,14 +78,14 @@ public:
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
// ### Qt 6: remove; the compiler-generated ones are fine!
QTransform &operator=(QTransform &&other) Q_DECL_NOTHROW // = default
- { memcpy(this, &other, sizeof(QTransform)); return *this; }
+ { memcpy(static_cast<void *>(this), static_cast<void *>(&other), sizeof(QTransform)); return *this; }
QTransform &operator=(const QTransform &) Q_DECL_NOTHROW; // = default
QTransform(QTransform &&other) Q_DECL_NOTHROW // = default
: affine(Qt::Uninitialized)
- { memcpy(this, &other, sizeof(QTransform)); }
+ { memcpy(static_cast<void *>(this), static_cast<void *>(&other), sizeof(QTransform)); }
QTransform(const QTransform &other) Q_DECL_NOTHROW // = default
: affine(Qt::Uninitialized)
- { memcpy(this, &other, sizeof(QTransform)); }
+ { memcpy(static_cast<void *>(this), static_cast<const void *>(&other), sizeof(QTransform)); }
#endif
bool isAffine() const;