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/config/string.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'core/config/string.cc') diff --git a/core/config/string.cc b/core/config/string.cc index 08e8c0d..198b448 100644 --- a/core/config/string.cc +++ b/core/config/string.cc @@ -2,17 +2,17 @@ #include "core/config/string.hh" -config::String::String(const char* default_value) +config::String::String(std::string_view default_value) { m_value = default_value; } -void config::String::set(const char* value) +void config::String::set(std::string_view value) { m_value = value; } -const char* config::String::get(void) const +std::string_view config::String::get(void) const { - return m_value.c_str(); + return m_value; } -- cgit