Silence a GCC 8 warning in qoutlinemapper

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 <simon.hausmann@qt.io>
bb10
Ville Voutilainen 2018-02-27 14:53:37 +02:00
parent d62d51c7e6
commit ea1137ff5e
1 changed files with 1 additions and 1 deletions

View File

@ -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<void *>(m_elements.data()), static_cast<const void *>(path.points()), count* sizeof(QPointF));
m_element_types.resize(0);
}