diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2016-09-26 13:38:11 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2016-09-26 14:55:49 -0700 |
commit | a9842dbd6bbd370f185505212ed3441b29e25240 (patch) | |
tree | 1f93c25a8c5b087547c7c1f1c4f0bc9bc182cba2 /platform/default | |
parent | 8764c20621f09f78e3c0c66790c46f56c964f657 (diff) | |
download | qtlocation-mapboxgl-a9842dbd6bbd370f185505212ed3441b29e25240.tar.gz |
[core] Extract some GlyphRange-related constants
Diffstat (limited to 'platform/default')
-rw-r--r-- | platform/default/mbgl/storage/offline_download.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/platform/default/mbgl/storage/offline_download.cpp b/platform/default/mbgl/storage/offline_download.cpp index 5728b66647..293166b807 100644 --- a/platform/default/mbgl/storage/offline_download.cpp +++ b/platform/default/mbgl/storage/offline_download.cpp @@ -114,7 +114,7 @@ OfflineRegionStatus OfflineDownload::getStatus() const { } if (!parser.glyphURL.empty()) { - result.requiredResourceCount += parser.fontStacks().size() * 256; + result.requiredResourceCount += parser.fontStacks().size() * GLYPH_RANGES_PER_FONT_STACK; } if (!parser.spriteURL.empty()) { @@ -184,8 +184,8 @@ void OfflineDownload::activateDownload() { if (!parser.glyphURL.empty()) { for (const auto& fontStack : parser.fontStacks()) { - for (uint32_t i = 0; i < 256; i++) { - queueResource(Resource::glyphs(parser.glyphURL, fontStack, getGlyphRange(i * 256))); + for (uint32_t i = 0; i < GLYPH_RANGES_PER_FONT_STACK; i++) { + queueResource(Resource::glyphs(parser.glyphURL, fontStack, getGlyphRange(i * GLYPHS_PER_GLYPH_RANGE))); } } } |