From ea1137ff5e5394e1420be27aa56dc92cee841df5 Mon Sep 17 00:00:00 2001 From: Ville Voutilainen Date: Tue, 27 Feb 2018 14:53:37 +0200 Subject: [PATCH] Silence a GCC 8 warning in qoutlinemapper MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit qtbase/src/gui/painting/qoutlinemapper.cpp: In member function ‘QT_FT_Outline* QOutlineMapper::convertPath(const QVectorPath&)’: qtbase/src/gui/painting/qoutlinemapper.cpp:182:76: error: ‘void* memcpy(void*, const void*, size_t)’ copying an object of non-trivial type ‘class QPointF’ from an array of ‘const qreal’ {aka ‘const double’} [-Werror=class-memaccess] memcpy(m_elements.data(), path.points(), count* sizeof(QPointF)); Change-Id: Ieca99f0262c57e58adbcf48ac923ae11bd428b00 Reviewed-by: Simon Hausmann --- src/gui/painting/qoutlinemapper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/painting/qoutlinemapper.cpp b/src/gui/painting/qoutlinemapper.cpp index f1e4ce5820..b2d02182c3 100644 --- a/src/gui/painting/qoutlinemapper.cpp +++ b/src/gui/painting/qoutlinemapper.cpp @@ -179,7 +179,7 @@ QT_FT_Outline *QOutlineMapper::convertPath(const QVectorPath &path) m_elements.resize(count); if (count) - memcpy(m_elements.data(), path.points(), count* sizeof(QPointF)); + memcpy(static_cast(m_elements.data()), static_cast(path.points()), count* sizeof(QPointF)); m_element_types.resize(0); }