Silence a GCC 8 warning in qpainter
qtbase/src/gui/painting/qpainter.cpp:5625:68: error: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct QFixed’; use assignment or value-initialization instead [-Werror=class-memaccess] memset(advances.data(), 0, advances.size() * sizeof(QFixed)); Change-Id: I563b1b0c5dfaf381a9521bc9a4dc3197f0f38d11 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This commit is contained in:
parent
ea1137ff5e
commit
71cdc95006
@ -5622,8 +5622,8 @@ void QPainterPrivate::drawGlyphs(const quint32 *glyphArray, QFixedPoint *positio
|
||||
QVarLengthArray<QGlyphJustification, 128> glyphJustifications(glyphCount);
|
||||
QVarLengthArray<QGlyphAttributes, 128> glyphAttributes(glyphCount);
|
||||
memset(glyphAttributes.data(), 0, glyphAttributes.size() * sizeof(QGlyphAttributes));
|
||||
memset(advances.data(), 0, advances.size() * sizeof(QFixed));
|
||||
memset(glyphJustifications.data(), 0, glyphJustifications.size() * sizeof(QGlyphJustification));
|
||||
memset(static_cast<void *>(advances.data()), 0, advances.size() * sizeof(QFixed));
|
||||
memset(static_cast<void *>(glyphJustifications.data()), 0, glyphJustifications.size() * sizeof(QGlyphJustification));
|
||||
|
||||
textItem.glyphs.numGlyphs = glyphCount;
|
||||
textItem.glyphs.glyphs = const_cast<glyph_t *>(glyphArray);
|
||||
|
Loading…
Reference in New Issue
Block a user