MCPcopy Create free account
hub / github.com/comaps/comaps / ToString

Method ToString

libs/drape/utils/glyph_usage_tracker.cpp:9–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7namespace dp
8{
9std::string GlyphUsageTracker::GlyphUsageStatistic::ToString() const
10{
11 std::ostringstream ss;
12 ss << " ----- Glyphs usage report ----- \n";
13 ss << " Current language = " << languages::GetCurrentOrig() << "\n";
14 ss << " Invalid glyphs count = " << m_invalidGlyphs.size() << "\n";
15 ss << " Invalid glyphs: { ";
16 for (auto const & it : m_invalidGlyphs)
17 ss << std::hex << static_cast<uint32_t>(it.first) << std::dec << "(" << it.second << ") ";
18 ss << "}\n";
19
20 ss << " Unexpected glyphs count = " << m_unexpectedGlyphs.size() << "\n";
21 ss << " Unexpected glyphs: {\n";
22 for (auto const & it : m_unexpectedGlyphs)
23 {
24 ss << " glyph = " << std::hex << static_cast<uint32_t>(it.first) << std::dec
25 << ", unique usages = " << it.second.m_counter << ", group = " << it.second.m_group << ", expected groups = { ";
26
27 for (auto const & gr : it.second.m_expectedGroups)
28 ss << gr << " ";
29 ss << "}\n";
30 }
31 ss << " }\n";
32 ss << " ----- Glyphs usage report ----- \n";
33
34 return ss.str();
35}
36
37GlyphUsageTracker & GlyphUsageTracker::Instance()
38{

Callers

nothing calls this directly

Calls 2

GetCurrentOrigFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected