summaryrefslogtreecommitdiff
path: root/platform/default
diff options
context:
space:
mode:
authorChris Loer <chris.loer@gmail.com>2016-11-09 18:23:49 -0800
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-11-17 14:33:03 -0800
commit40b0c8d0760f8a767ef4646607ac63251d86de8d (patch)
tree5840c35c21dcb593198093769db8c81be6ce3674 /platform/default
parent5c7aeec5c7170f47a127391cfdb5e25b42ec8b58 (diff)
downloadqtlocation-mapboxgl-40b0c8d0760f8a767ef4646607ac63251d86de8d.tar.gz
[core] Use UTF-16 instead of UTF-32 for label features to avoid extra conversions and reduce in-memory size.
Continue to use uint32 as glyph ID to maintain Glyph PBF, even though we're only using 16 bits of that uint32. Use std::codecvt instead of boost::unicode_iterator for UTF8->UTF16 conversions.
Diffstat (limited to 'platform/default')
-rw-r--r--platform/default/mbgl/storage/offline_download.cpp2
-rw-r--r--platform/default/string_stdlib.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/platform/default/mbgl/storage/offline_download.cpp b/platform/default/mbgl/storage/offline_download.cpp
index 9e2e11c86f..3edc75845c 100644
--- a/platform/default/mbgl/storage/offline_download.cpp
+++ b/platform/default/mbgl/storage/offline_download.cpp
@@ -184,7 +184,7 @@ void OfflineDownload::activateDownload() {
if (!parser.glyphURL.empty()) {
for (const auto& fontStack : parser.fontStacks()) {
- for (uint32_t i = 0; i < GLYPH_RANGES_PER_FONT_STACK; i++) {
+ for (char16_t i = 0; i < GLYPH_RANGES_PER_FONT_STACK; i++) {
queueResource(Resource::glyphs(parser.glyphURL, fontStack, getGlyphRange(i * GLYPHS_PER_GLYPH_RANGE)));
}
}
diff --git a/platform/default/string_stdlib.cpp b/platform/default/string_stdlib.cpp
index 90a75c1738..0e97fc54d5 100644
--- a/platform/default/string_stdlib.cpp
+++ b/platform/default/string_stdlib.cpp
@@ -1,10 +1,10 @@
#include <mbgl/platform/platform.hpp>
-#include <mbgl/util/utf.hpp>
#define NU_WITH_TOUPPER
#define NU_WITH_TOLOWER
#define NU_WITH_UTF8_WRITER
#include <libnu/libnu.h>
#include <cstring>
+#include <sstream>
namespace mbgl { namespace platform {