diff options
author | Robin Burchell <robin.burchell@collabora.co.uk> | 2010-07-18 21:05:44 (GMT) |
---|---|---|
committer | Andreas Kling <andreas.kling@nokia.com> | 2010-07-18 21:05:47 (GMT) |
commit | c6812138900b05012831e0f94d7d00aeac86cc2f (patch) | |
tree | 75c1fd3fbe54fbeb0b131bb71032c813ca6fd086 /src/gui/text/qstatictext.cpp | |
parent | 53d3083eecf88a20bc36ada43942c7a18677af62 (diff) | |
download | Qt-c6812138900b05012831e0f94d7d00aeac86cc2f.zip Qt-c6812138900b05012831e0f94d7d00aeac86cc2f.tar.gz Qt-c6812138900b05012831e0f94d7d00aeac86cc2f.tar.bz2 |
Remove qMemCopy() usage from all .cpp files of Qt itself.
This is (supposedly) more efficient as the compiler can optimise it to a
builtin, per Thiago.
Merge-request: 2430
Reviewed-by: Andreas Kling <andreas.kling@nokia.com>
Diffstat (limited to 'src/gui/text/qstatictext.cpp')
-rw-r--r-- | src/gui/text/qstatictext.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/text/qstatictext.cpp b/src/gui/text/qstatictext.cpp index 91a6612..ab518d0 100644 --- a/src/gui/text/qstatictext.cpp +++ b/src/gui/text/qstatictext.cpp @@ -465,13 +465,13 @@ namespace { m_chars.resize(m_chars.size() + ti.num_chars); glyph_t *glyphsDestination = m_glyphs.data() + currentItem.glyphOffset; - qMemCopy(glyphsDestination, glyphs.constData(), sizeof(glyph_t) * currentItem.numGlyphs); + memcpy(glyphsDestination, glyphs.constData(), sizeof(glyph_t) * currentItem.numGlyphs); QFixedPoint *positionsDestination = m_positions.data() + currentItem.positionOffset; - qMemCopy(positionsDestination, positions.constData(), sizeof(QFixedPoint) * currentItem.numGlyphs); + memcpy(positionsDestination, positions.constData(), sizeof(QFixedPoint) * currentItem.numGlyphs); QChar *charsDestination = m_chars.data() + currentItem.charOffset; - qMemCopy(charsDestination, ti.chars, sizeof(QChar) * currentItem.numChars); + memcpy(charsDestination, ti.chars, sizeof(QChar) * currentItem.numChars); m_items.append(currentItem); } @@ -681,13 +681,13 @@ void QStaticTextPrivate::init() items = new QStaticTextItem[itemCount]; glyphPool = new glyph_t[glyphs.size()]; - qMemCopy(glyphPool, glyphs.constData(), glyphs.size() * sizeof(glyph_t)); + memcpy(glyphPool, glyphs.constData(), glyphs.size() * sizeof(glyph_t)); positionPool = new QFixedPoint[positions.size()]; - qMemCopy(positionPool, positions.constData(), positions.size() * sizeof(QFixedPoint)); + memcpy(positionPool, positions.constData(), positions.size() * sizeof(QFixedPoint)); charPool = new QChar[chars.size()]; - qMemCopy(charPool, chars.constData(), chars.size() * sizeof(QChar)); + memcpy(charPool, chars.constData(), chars.size() * sizeof(QChar)); for (int i=0; i<itemCount; ++i) { items[i] = deviceItems.at(i); |