diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-05-28 16:41:49 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-06-03 15:14:42 +0200 |
commit | e4079eca49adce16e31dac2a18d49d7a55817891 (patch) | |
tree | 1dfb960ec1115b1f552afe8a013058542389505e /src/gui/text/qfontengine.cpp | |
parent | f32a6cfb6b6236533508901f114ab57396da8ff3 (diff) | |
parent | ec6dc5f78453048c4f0604655a34c6c20c79d819 (diff) |
Merge remote-tracking branch 'origin/dev' into wip/cmake
Take 5.
Change-Id: Ifb2d20e95ba824e45e667fba6c2ba45389991cc3
Diffstat (limited to 'src/gui/text/qfontengine.cpp')
-rw-r--r-- | src/gui/text/qfontengine.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp index 1719855e68..537d4bcefd 100644 --- a/src/gui/text/qfontengine.cpp +++ b/src/gui/text/qfontengine.cpp @@ -1059,15 +1059,15 @@ void QFontEngine::setGlyphCache(const void *context, QFontEngineGlyphCache *cach Q_ASSERT(cache); GlyphCaches &caches = m_glyphCaches[context]; - for (GlyphCaches::const_iterator it = caches.constBegin(), end = caches.constEnd(); it != end; ++it) { - if (cache == it->cache.data()) + for (auto & e : caches) { + if (cache == e.cache.data()) return; } // Limit the glyph caches to 4 per context. This covers all 90 degree rotations, // and limits memory use when there is continuous or random rotation if (caches.size() == 4) - caches.removeLast(); + caches.pop_back(); GlyphCacheEntry entry; entry.cache = cache; @@ -1081,8 +1081,8 @@ QFontEngineGlyphCache *QFontEngine::glyphCache(const void *context, GlyphFormat if (caches == m_glyphCaches.cend()) return nullptr; - for (GlyphCaches::const_iterator it = caches->begin(), end = caches->end(); it != end; ++it) { - QFontEngineGlyphCache *cache = it->cache.data(); + for (auto &e : *caches) { + QFontEngineGlyphCache *cache = e.cache.data(); if (format == cache->glyphFormat() && qtransform_equals_no_translate(cache->m_transform, transform)) return cache; } @@ -1213,7 +1213,7 @@ void QFontEngine::loadKerningPairs(QFixed scalingFactor) end: std::sort(kerning_pairs.begin(), kerning_pairs.end()); // for (int i = 0; i < kerning_pairs.count(); ++i) -// qDebug() << 'i' << i << "left_right" << hex << kerning_pairs.at(i).left_right; +// qDebug() << 'i' << i << "left_right" << Qt::hex << kerning_pairs.at(i).left_right; } |