Fixed type aliases handling

This commit is contained in:
Bartek Kryza
2024-01-25 00:33:08 +01:00
parent 9376b856cc
commit 757b4d0947
9 changed files with 52 additions and 30 deletions

View File

@@ -458,8 +458,18 @@ struct relationship_hint_t {
using relationship_hints_t = std::map<std::string, relationship_hint_t>;
using type_aliases_t = std::map<std::string, std::string>;
struct type_aliases_longer_first_comparator {
bool operator()(const std::string &a, const std::string &b) const
{
if (a.size() == b.size())
return a > b;
return a.size() > b.size();
}
};
using type_aliases_longer_first_t =
std::map<std::string, std::string, std::greater<>>;
std::map<std::string, std::string, type_aliases_longer_first_comparator>;
enum class location_t { marker, fileline, function };