aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVille Voutilainen <ville.voutilainen@qt.io>2018-02-28 16:50:44 +0200
committerVille Voutilainen <ville.voutilainen@qt.io>2018-02-28 16:11:25 +0000
commit55f71cdfc5746a71bcb89f0fa4ff3447cb8b5514 (patch)
tree739c8bcef64217cf49c1f2fbf6fb448b42e7088d
parent12afec6c2f89264b7344f9221763898c77a396fc (diff)
Silence another GCC 8 warning in qpodvector
qtdeclarative/src/qml/qml/ftw/qpodvector_p.h:119:22: error: ‘void* memmove(void*, const void*, size_t)’ writing to an object of non-trivially copyable type ‘class QQuickBasePositioner::PositionedItem’; use copy-assignment or copy-initialization instead [-Werror=class-memaccess] ::memmove(m_data + idx, m_data + idx + count, Change-Id: I049703a0a6bb4432dfd3d3ce3c8cef13e9c2e31a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
-rw-r--r--src/qml/qml/ftw/qpodvector_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/qml/ftw/qpodvector_p.h b/src/qml/qml/ftw/qpodvector_p.h
index 5255c1f617..b2fb481793 100644
--- a/src/qml/qml/ftw/qpodvector_p.h
+++ b/src/qml/qml/ftw/qpodvector_p.h
@@ -116,7 +116,7 @@ public:
void remove(int idx, int count = 1) {
int moveCount = m_count - (idx + count);
if (moveCount)
- ::memmove(m_data + idx, m_data + idx + count,
+ ::memmove(static_cast<void *>(m_data + idx), static_cast<const void *>(m_data + idx + count),
moveCount * sizeof(T));
m_count -= count;
}