From aaed751bf4430bf4b9b30cef532b8753b9f639ce Mon Sep 17 00:00:00 2001 From: untodesu Date: Thu, 11 Sep 2025 13:48:31 +0500 Subject: Replace most of C strings with string_view --- core/io/config_map.hh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'core/io/config_map.hh') diff --git a/core/io/config_map.hh b/core/io/config_map.hh index 8ff92e1..7ab7543 100644 --- a/core/io/config_map.hh +++ b/core/io/config_map.hh @@ -15,15 +15,15 @@ public: virtual ~ConfigMap(void) = default; void load_cmdline(void); - bool load_file(const char* path); - bool save_file(const char* path) const; + bool load_file(std::string_view path); + bool save_file(std::string_view path) const; - bool set_value(const char* name, const char* value); - const char* get_value(const char* name) const; + bool set_value(std::string_view name, std::string_view value); + std::string_view get_value(std::string_view name) const; - void add_value(const char* name, config::IValue& vref); + void add_value(std::string_view name, config::IValue& vref); - const config::IValue* find(const char* name) const; + const config::IValue* find(std::string_view name) const; private: std::unordered_map m_values; -- cgit