[Config] Use std::less<> for std::map<...>

Reduces amount of string copies
[Utilities] fmt::replace_all: avoid creation of temporary strings
This commit is contained in:
DH 2021-11-28 09:30:41 +02:00 committed by Nekotekina
parent 2981867375
commit cccfb89aa0
14 changed files with 80 additions and 62 deletions

View file

@ -227,7 +227,7 @@ namespace logs
}
}
void set_channel_levels(const std::map<std::string, logs::level>& map)
void set_channel_levels(const std::map<std::string, logs::level, std::less<>>& map)
{
for (auto&& pair : map)
{

View file

@ -164,7 +164,7 @@ namespace logs
level get_level(const std::string&);
// Log level control: set specific channels to level::fatal
void set_channel_levels(const std::map<std::string, logs::level>& map);
void set_channel_levels(const std::map<std::string, logs::level, std::less<>>& map);
// Get all registered log channels
std::vector<std::string> get_channels();