Remove utils::hasKey(), as we now have .contains()
This commit is contained in:
6
utils.h
6
utils.h
@@ -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);
|
||||
|
Reference in New Issue
Block a user