diff --git a/src/ConfigMap.cpp b/src/ConfigMap.cpp index 6bc988f..64ea32e 100644 --- a/src/ConfigMap.cpp +++ b/src/ConfigMap.cpp @@ -178,7 +178,7 @@ namespace configmaps return str.substr(front_idx, back_idx - front_idx + 1); } - bool ConfigMap::hasKey(std::string key) + bool ConfigMap::hasKey(std::string key) const { return (find(key) != end()); } diff --git a/src/ConfigMap.hpp b/src/ConfigMap.hpp index 8c31b39..dc6f993 100644 --- a/src/ConfigMap.hpp +++ b/src/ConfigMap.hpp @@ -80,7 +80,7 @@ namespace configmaps { return w; } - bool hasKey(std::string key); + bool hasKey(std::string key) const; void updateMap(ConfigMap &update); static ConfigMap fromYamlStream(std::istream &in);