diff options
author | Liang Qi <liang.qi@qt.io> | 2018-02-16 08:54:58 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2018-02-16 08:54:58 +0100 |
commit | 942ab490724fcc9544e786e5783718e1a07aa50b (patch) | |
tree | feb7d3ff716edb37b2ca60e33c05adf8777bd964 /src/gui/text | |
parent | 0fb8271a467202990c90321066e40faed640a7a8 (diff) | |
parent | 24adaa9a742e6f95ff897d0eb9a2bce0527dd042 (diff) |
Merge remote-tracking branch 'origin/5.11' into dev
Conflicts:
src/corelib/tools/tools.pri
Change-Id: I705630f9cecbf0ce51a22fc6116b8c49611259e9
Diffstat (limited to 'src/gui/text')
-rw-r--r-- | src/gui/text/qtextengine_p.h | 8 | ||||
-rw-r--r-- | src/gui/text/qtextobject.h | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/text/qtextengine_p.h b/src/gui/text/qtextengine_p.h index 8cdbeafd7d..4b1564e69c 100644 --- a/src/gui/text/qtextengine_p.h +++ b/src/gui/text/qtextengine_p.h @@ -237,13 +237,13 @@ struct QGlyphLayout last = numGlyphs; if (first == 0 && last == numGlyphs && reinterpret_cast<char *>(offsets + numGlyphs) == reinterpret_cast<char *>(glyphs)) { - memset(offsets, 0, (numGlyphs * SpaceNeeded)); + memset(static_cast<void *>(offsets), 0, (numGlyphs * SpaceNeeded)); } else { const int num = last - first; - memset(offsets + first, 0, num * sizeof(QFixedPoint)); + memset(static_cast<void *>(offsets + first), 0, num * sizeof(QFixedPoint)); memset(glyphs + first, 0, num * sizeof(glyph_t)); - memset(advances + first, 0, num * sizeof(QFixed)); - memset(justifications + first, 0, num * sizeof(QGlyphJustification)); + memset(static_cast<void *>(advances + first), 0, num * sizeof(QFixed)); + memset(static_cast<void *>(justifications + first), 0, num * sizeof(QGlyphJustification)); memset(attributes + first, 0, num * sizeof(QGlyphAttributes)); } } diff --git a/src/gui/text/qtextobject.h b/src/gui/text/qtextobject.h index 7e4efa28f8..067f8473ea 100644 --- a/src/gui/text/qtextobject.h +++ b/src/gui/text/qtextobject.h @@ -154,9 +154,9 @@ public: iterator(const iterator &o) Q_DECL_NOTHROW; // = default iterator &operator=(const iterator &o) Q_DECL_NOTHROW; // = default iterator(iterator &&other) Q_DECL_NOTHROW // = default - { memcpy(this, &other, sizeof(iterator)); } + { memcpy(static_cast<void *>(this), static_cast<void *>(&other), sizeof(iterator)); } iterator &operator=(iterator &&other) Q_DECL_NOTHROW // = default - { memcpy(this, &other, sizeof(iterator)); return *this; } + { memcpy(static_cast<void *>(this), static_cast<void *>(&other), sizeof(iterator)); return *this; } #endif QTextFrame *parentFrame() const { return f; } |