mirror of
https://github.com/matrix-construct/construct
synced 2025-01-14 00:34:18 +01:00
ircd::mods: Use std map for mangles.
This commit is contained in:
parent
b4f09d06ec
commit
e15045ea3f
2 changed files with 7 additions and 7 deletions
|
@ -19,9 +19,9 @@ namespace ircd::mods
|
|||
std::vector<std::string> symbols(const string_view &fullpath, const string_view §ion);
|
||||
std::vector<std::string> symbols(const string_view &fullpath);
|
||||
|
||||
std::unordered_map<std::string, std::string> mangles(const std::vector<std::string> &);
|
||||
std::unordered_map<std::string, std::string> mangles(const string_view &fullpath, const string_view §ion);
|
||||
std::unordered_map<std::string, std::string> mangles(const string_view &fullpath);
|
||||
std::map<std::string, std::string> mangles(const std::vector<std::string> &);
|
||||
std::map<std::string, std::string> mangles(const string_view &fullpath, const string_view §ion);
|
||||
std::map<std::string, std::string> mangles(const string_view &fullpath);
|
||||
|
||||
// Find module names where symbol resides
|
||||
bool has_symbol(const string_view &name, const string_view &symbol, const string_view §ion = {});
|
||||
|
|
|
@ -819,23 +819,23 @@ ircd::mods::has_symbol(const string_view &name,
|
|||
return std::find(begin(syms), end(syms), symbol) != end(syms);
|
||||
}
|
||||
|
||||
std::unordered_map<std::string, std::string>
|
||||
std::map<std::string, std::string>
|
||||
ircd::mods::mangles(const string_view &path)
|
||||
{
|
||||
return mangles(mods::symbols(path));
|
||||
}
|
||||
|
||||
std::unordered_map<std::string, std::string>
|
||||
std::map<std::string, std::string>
|
||||
ircd::mods::mangles(const string_view &path,
|
||||
const string_view §ion)
|
||||
{
|
||||
return mangles(mods::symbols(path, section));
|
||||
}
|
||||
|
||||
std::unordered_map<std::string, std::string>
|
||||
std::map<std::string, std::string>
|
||||
ircd::mods::mangles(const std::vector<std::string> &symbols)
|
||||
{
|
||||
std::unordered_map<std::string, std::string> ret;
|
||||
std::map<std::string, std::string> ret;
|
||||
for(const auto &sym : symbols) try
|
||||
{
|
||||
ret.emplace(demangle(sym), sym);
|
||||
|
|
Loading…
Reference in a new issue