make util::utf8_to_utf32::convert() static

This commit is contained in:
artemp
2014-11-03 15:44:27 +00:00
parent f0b8fa2839
commit 92124d3aa1
2 changed files with 2 additions and 5 deletions

View File

@@ -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<std::string::const_iterator> begin(utf8.begin());
boost::u8_to_u32_iterator<std::string::const_iterator> end(utf8.end());

View File

@@ -52,8 +52,6 @@ std::vector<SymbolFeature> SymbolBucket::processFeatures(const VectorTileLayer &
return features;
}
util::utf8_to_utf32 ucs4conv;
// Determine and load glyph ranges
std::set<GlyphRange> ranges;
@@ -72,7 +70,7 @@ std::vector<SymbolFeature> 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.