From 4b71530f4c5b3a79733487a6760339e6da5b7f93 Mon Sep 17 00:00:00 2001 From: Tomasz Sowa Date: Mon, 12 Apr 2021 18:55:04 +0200 Subject: [PATCH] added to Config: bool Config::HasValue(const wchar_t * name, const wchar_t * value) --- winixd/core/config.cpp | 11 +++++++++++ winixd/core/config.h | 3 +++ 2 files changed, 14 insertions(+) diff --git a/winixd/core/config.cpp b/winixd/core/config.cpp index c2b315b..169c0ff 100644 --- a/winixd/core/config.cpp +++ b/winixd/core/config.cpp @@ -481,6 +481,17 @@ bool Config::ListText(const std::wstring & name, std::vector & lis return space.to_list(name, list); } +bool Config::HasValue(const wchar_t * name, const wchar_t * value) +{ + return space.has_value(name, value); +} + + +bool Config::HasValue(const std::wstring & name, const std::wstring & value) +{ + return space.has_value(name.c_str(), value.c_str()); +} + diff --git a/winixd/core/config.h b/winixd/core/config.h index 0cd1134..4554b9c 100644 --- a/winixd/core/config.h +++ b/winixd/core/config.h @@ -809,6 +809,9 @@ public: bool ListText(const wchar_t * name, std::vector & list); bool ListText(const std::wstring & name, std::vector & list); + bool HasValue(const wchar_t * name, const wchar_t * value); + bool HasValue(const std::wstring & name, const std::wstring & value); + // for debug //void Print(std::wostream & out);