Refactored standard template aliases to configuration file

This commit is contained in:
Bartek Kryza
2022-05-21 23:16:51 +02:00
parent 13f0f3861c
commit f5e0515b7e
5 changed files with 29 additions and 28 deletions

View File

@@ -36,14 +36,7 @@ void template_parameter::set_type(const std::string &type) { type_ = type; }
std::string template_parameter::type() const { return type_; }
void template_parameter::set_name(const std::string &name)
{
name_ = name;
// TODO: Add a configurable mapping for simplifying non-interesting
// std templates
util::replace_all(name_, "std::basic_string<char>", "std::string");
util::replace_all(name_, "std::basic_string<wchar_t>", "std::wstring");
}
void template_parameter::set_name(const std::string &name) { name_ = name; }
std::string template_parameter::name() const
{
@@ -157,10 +150,6 @@ std::string template_parameter::to_string(
res += default_value();
}
// TODO: Refactor this to external configurable class
util::replace_all(res, "std::basic_string<char>", "std::string");
util::replace_all(res, "std::basic_string<wchar_t>", "std::wstring");
return res;
}