Fixing Clang warnings 3

This commit is contained in:
Lukas Matena
2021-02-08 17:52:29 +01:00
parent b85de89751
commit 1834ebe981
21 changed files with 25 additions and 29 deletions
+2 -2
View File
@@ -1358,11 +1358,11 @@ public:
// Initialize the map.
const t_config_enum_values &enum_keys_map = ConfigOptionEnum<T>::get_enum_values();
int cnt = 0;
for (const std::pair<std::string, int> &kvp : enum_keys_map)
for (const auto& kvp : enum_keys_map)
cnt = std::max(cnt, kvp.second);
cnt += 1;
names.assign(cnt, "");
for (const std::pair<std::string, int> &kvp : enum_keys_map)
for (const auto& kvp : enum_keys_map)
names[kvp.second] = kvp.first;
}
return names;