summaryrefslogtreecommitdiff
path: root/src/mbgl/text
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2017-05-12 16:19:05 +0300
committerBruno de Oliveira Abinader <bruno@mapbox.com>2017-05-12 18:07:36 +0300
commit19c15ab557728247ea900118aaace1e45763baf4 (patch)
tree90e4d0070ad4e1d760babc3b6bc53d9ec5ca4408 /src/mbgl/text
parentc6eb4afe0ebdabfd436a80adf8af505779859404 (diff)
downloadqtlocation-mapboxgl-19c15ab557728247ea900118aaace1e45763baf4.tar.gz
[tidy] modernize-loop-convert
Diffstat (limited to 'src/mbgl/text')
-rw-r--r--src/mbgl/text/glyph_atlas.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mbgl/text/glyph_atlas.cpp b/src/mbgl/text/glyph_atlas.cpp
index 4feaab01f9..b43971f704 100644
--- a/src/mbgl/text/glyph_atlas.cpp
+++ b/src/mbgl/text/glyph_atlas.cpp
@@ -207,8 +207,8 @@ Rect<uint16_t> GlyphAtlas::addGlyph(GlyphValue& value) {
}
void GlyphAtlas::removeGlyphValues(GlyphRequestor& requestor, std::map<GlyphID, GlyphValue>& values) {
- for (auto it = values.begin(); it != values.end(); it++) {
- GlyphValue& value = it->second;
+ for (auto& it : values) {
+ GlyphValue& value = it.second;
if (value.ids.erase(&requestor) && value.ids.empty() && value.rect) {
const Rect<uint16_t>& rect = *value.rect;
@@ -228,8 +228,8 @@ void GlyphAtlas::removeGlyphValues(GlyphRequestor& requestor, std::map<GlyphID,
}
void GlyphAtlas::removePendingRanges(mbgl::GlyphRequestor& requestor, std::map<GlyphRange, GlyphRequest>& ranges) {
- for (auto it = ranges.begin(); it != ranges.end(); it++) {
- it->second.requestors.erase(&requestor);
+ for (auto& range : ranges) {
+ range.second.requestors.erase(&requestor);
}
}