diff options
| author | untodesu <kirill@untode.su> | 2025-09-11 13:48:31 +0500 |
|---|---|---|
| committer | untodesu <kirill@untode.su> | 2025-09-11 13:48:31 +0500 |
| commit | aaed751bf4430bf4b9b30cef532b8753b9f639ce (patch) | |
| tree | 16bc751c272ba27ad53ec48dbdd3a6d9e6a8d4c2 /core/io/config_map.hh | |
| parent | 96bd73ae020ecca1f94698744c77498a89ad19f7 (diff) | |
| download | voxelius-aaed751bf4430bf4b9b30cef532b8753b9f639ce.tar.bz2 voxelius-aaed751bf4430bf4b9b30cef532b8753b9f639ce.zip | |
Replace most of C strings with string_view
Diffstat (limited to 'core/io/config_map.hh')
| -rw-r--r-- | core/io/config_map.hh | 12 |
1 files changed, 6 insertions, 6 deletions
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<std::string, config::IValue*> m_values; |
