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

Function ProcessName

libs/indexer/categories_holder.cpp:68–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66}
67
68void ProcessName(CategoriesHolder::Category::Name name, std::vector<std::string> const & groups,
69 std::vector<uint32_t> const & types, CategoriesHolder::GroupTranslations & translations,
70 std::vector<CategoriesHolder::Category::Name> & synonyms)
71{
72 if (name.m_name.empty())
73 {
74 LOG(LWARNING, ("Incorrect name for category:", groups));
75 return;
76 }
77
78 FillPrefixLengthToSuggest(name);
79
80 if (name.m_name.starts_with("U+") && !ParseEmoji(name))
81 return;
82
83 if (groups.size() == 1 && types.empty())
84 {
85 // Not a translation, but a category group definition.
86 translations[groups[0]].push_back(name);
87 }
88 else
89 {
90 synonyms.push_back(name);
91 }
92}
93
94void ProcessCategory(std::string_view line, std::vector<std::string> & groups, std::vector<uint32_t> & types)
95{

Callers 1

LoadFromStreamMethod · 0.85

Calls 5

ParseEmojiFunction · 0.85
emptyMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected