Remove utils::hasKey(), as we now have .contains()

This commit is contained in:
2021-10-19 12:48:45 +02:00
parent d035579da7
commit 873401694e
3 changed files with 3 additions and 9 deletions

View File

@@ -20,12 +20,6 @@ std::string strreplace(std::string str, const std::string &search, const std::st
std::string html_xss(std::string_view str);
std::string getenv(const std::string &key);
template <class T, class U> bool hasKey(const std::map<T, U> &map, const T &key)
{
auto k = map.find(key);
return k != map.end();
}
template <class T, class U> U getKeyOrEmpty(const std::map<T, U> &map, const T &key)
{
auto k = map.find(key);