From 57fdc279e86a605c71825af81e73b00fef985620 Mon Sep 17 00:00:00 2001 From: Julian Liersch Date: Mon, 29 Jul 2024 11:40:13 +0200 Subject: [PATCH] ConfigMap::hasKey const correctness --- src/ConfigMap.cpp | 2 +- src/ConfigMap.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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);