From 15cb81f87886386ec33a170711b0d09d5d94cde3 Mon Sep 17 00:00:00 2001 From: Baptiste Wicht Date: Fri, 22 Sep 2023 19:49:41 +0200 Subject: [PATCH] Use map::contains --- src/config.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config.cpp b/src/config.cpp index 73cb072..eee8f9a 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -236,7 +236,7 @@ fs::path budget::path_to_budget_file(std::string_view file) { } bool budget::config_contains(std::string_view key){ - return configuration.find(key) != configuration.end(); + return configuration.contains(key); } std::string budget::config_value(std::string_view key){ @@ -293,7 +293,7 @@ bool budget::user_config_value_bool(std::string_view key, bool def) { bool budget::internal_config_contains(std::string_view key){ const server_lock_guard l(internal_config_lock); - return internal.find(key) != internal.end(); + return internal.contains(key); } std::string budget::internal_config_value(std::string_view key){