[FormatManager] Provide only one variant of EnableCategory.

All the callers pass a single language anyway.
This commit is contained in:
Davide Italiano 2019-12-03 15:02:54 -08:00
parent 89618a7ce1
commit 0cfb4a6b3d
1 changed files with 2 additions and 11 deletions

View File

@ -52,23 +52,14 @@ public:
void
EnableCategory(ConstString category_name,
TypeCategoryMap::Position pos = TypeCategoryMap::Default) {
EnableCategory(category_name, pos,
std::initializer_list<lldb::LanguageType>());
EnableCategory(category_name, pos, {});
}
void EnableCategory(ConstString category_name,
TypeCategoryMap::Position pos, lldb::LanguageType lang) {
std::initializer_list<lldb::LanguageType> langs = {lang};
EnableCategory(category_name, pos, langs);
}
void EnableCategory(ConstString category_name,
TypeCategoryMap::Position pos = TypeCategoryMap::Default,
std::initializer_list<lldb::LanguageType> langs = {}) {
TypeCategoryMap::ValueSP category_sp;
if (m_categories_map.Get(category_name, category_sp) && category_sp) {
m_categories_map.Enable(category_sp, pos);
for (const lldb::LanguageType lang : langs)
category_sp->AddLanguage(lang);
}
}