diff options
author | Paul Olav Tvete <paul.tvete@qt.io> | 2020-10-01 16:04:52 +0200 |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@qt.io> | 2020-10-05 11:26:16 +0200 |
commit | f574982432fea6a5e4f876dae8198783ed1c1ece (patch) | |
tree | 534c094a13b7b9809e1714267db7210ff12db348 /src | |
parent | 86379e265e19a078545306d93c59b0d92c04920a (diff) |
Fix compiler warning
Replace evil reinterpret_cast by evil nested static_cast. This fixes
the warning `warning: dereferencing type-punned pointer will break
strict-aliasing rules'
Change-Id: I5ad608377444aa42b79a38db656acd94508716a0
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/quick/items/qquickwindow.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp index a2cf478f68..703623b38b 100644 --- a/src/quick/items/qquickwindow.cpp +++ b/src/quick/items/qquickwindow.cpp @@ -869,7 +869,7 @@ QMouseEvent QQuickWindowPrivate::touchToMouseEvent(QEvent::Type type, const QEve ret.setAccepted(true); ret.setTimestamp(event->timestamp()); static_assert(sizeof(QMutableSinglePointEvent) == sizeof(QMouseEvent)); - return *reinterpret_cast<QMouseEvent*>(&ret); + return *static_cast<QMouseEvent*>(static_cast<QSinglePointEvent*>(&ret)); } bool QQuickWindowPrivate::checkIfDoubleTapped(ulong newPressEventTimestamp, QPoint newPressPos) |