From 40b0c8d0760f8a767ef4646607ac63251d86de8d Mon Sep 17 00:00:00 2001 From: Chris Loer Date: Wed, 9 Nov 2016 18:23:49 -0800 Subject: [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. --- src/mbgl/layout/merge_lines.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mbgl/layout/merge_lines.cpp') diff --git a/src/mbgl/layout/merge_lines.cpp b/src/mbgl/layout/merge_lines.cpp index f4fdb82617..676cbc092d 100644 --- a/src/mbgl/layout/merge_lines.cpp +++ b/src/mbgl/layout/merge_lines.cpp @@ -47,10 +47,10 @@ enum class Side { }; size_t -getKey(const std::u32string& text, const GeometryCollection& geom, Side side) { +getKey(const std::u16string& text, const GeometryCollection& geom, Side side) { const GeometryCoordinate& coord = side == Side::Right ? geom[0].back() : geom[0].front(); - auto hash = std::hash()(text); + auto hash = std::hash()(text); boost::hash_combine(hash, coord.x); boost::hash_combine(hash, coord.y); return hash; -- cgit v1.2.1