make util::utf8_to_utf32::convert() static
This commit is contained in:
@@ -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());
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user