From 92124d3aa1f53e40b174d82e29771bd292bc2001 Mon Sep 17 00:00:00 2001 From: artemp Date: Mon, 3 Nov 2014 15:44:27 +0000 Subject: [PATCH] make util::utf8_to_utf32::convert() static --- include/mbgl/util/utf.hpp | 3 +-- src/renderer/symbol_bucket.cpp | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/include/mbgl/util/utf.hpp b/include/mbgl/util/utf.hpp index d36cfae7e..d6ba2a1f2 100644 --- a/include/mbgl/util/utf.hpp +++ b/include/mbgl/util/utf.hpp @@ -11,8 +11,7 @@ namespace util { class utf8_to_utf32 { public: - explicit utf8_to_utf32() {} - std::u32string convert(std::string const& utf8) + static std::u32string convert(std::string const& utf8) { boost::u8_to_u32_iterator begin(utf8.begin()); boost::u8_to_u32_iterator end(utf8.end()); diff --git a/src/renderer/symbol_bucket.cpp b/src/renderer/symbol_bucket.cpp index 542c109db..37ff4a0a6 100644 --- a/src/renderer/symbol_bucket.cpp +++ b/src/renderer/symbol_bucket.cpp @@ -52,8 +52,6 @@ std::vector SymbolBucket::processFeatures(const VectorTileLayer & return features; } - util::utf8_to_utf32 ucs4conv; - // Determine and load glyph ranges std::set ranges; @@ -72,7 +70,7 @@ std::vector SymbolBucket::processFeatures(const VectorTileLayer & u8string = platform::lowercase(u8string); } - ft.label = ucs4conv.convert(u8string); + ft.label = util::utf8_to_utf32::convert(u8string); if (ft.label.size()) { // Loop through all characters of this text and collect unique codepoints.