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/boolean.hh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'core/config/boolean.hh') diff --git a/core/config/boolean.hh b/core/config/boolean.hh index 5285676..2e9855f 100644 --- a/core/config/boolean.hh +++ b/core/config/boolean.hh @@ -11,8 +11,8 @@ public: explicit Boolean(bool default_value = false); virtual ~Boolean(void) = default; - virtual void set(const char* value) override; - virtual const char* get(void) const override; + virtual void set(std::string_view value) override; + virtual std::string_view get(void) const override; bool get_value(void) const; void set_value(bool value); @@ -21,8 +21,8 @@ private: bool m_value; public: - static const char* to_string(bool value); - static bool from_string(const char* value); + static std::string_view to_string(bool value); + static bool from_string(std::string_view value); }; } // namespace config -- cgit