diff options
| author | untodesu <kirill@untode.su> | 2025-12-26 14:50:33 +0500 |
|---|---|---|
| committer | untodesu <kirill@untode.su> | 2025-12-26 14:50:33 +0500 |
| commit | 6c2abde5c99a236453b795abaa6d7d70105e31f7 (patch) | |
| tree | f085049b9615a7d03cca5de40adb6529d6c13e11 /src/core/io/config_map.cc | |
| parent | f40d09cb8f712e87691af4912f3630d92d692779 (diff) | |
| download | voxelius-6c2abde5c99a236453b795abaa6d7d70105e31f7.tar.bz2 voxelius-6c2abde5c99a236453b795abaa6d7d70105e31f7.zip | |
Just a big Ctrl+H refactoring
Diffstat (limited to 'src/core/io/config_map.cc')
| -rw-r--r-- | src/core/io/config_map.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/core/io/config_map.cc b/src/core/io/config_map.cc index 57692a7..8634fd6 100644 --- a/src/core/io/config_map.cc +++ b/src/core/io/config_map.cc @@ -10,16 +10,16 @@ #include "core/version.hh" -void io::ConfigMap::load_cmdline(void) +void ConfigMap::load_cmdline(void) { for(auto it : m_values) { - if(auto value = io::cmdline::get_cstr(it.first.c_str())) { + if(auto value = cmdline::get_cstr(it.first.c_str())) { it.second->set(value); } } } -bool io::ConfigMap::load_file(std::string_view path) +bool ConfigMap::load_file(std::string_view path) { if(auto file = PHYSFS_openRead(std::string(path).c_str())) { auto source = std::string(PHYSFS_fileLength(file), char(0x00)); @@ -71,7 +71,7 @@ bool io::ConfigMap::load_file(std::string_view path) return false; } -bool io::ConfigMap::save_file(std::string_view path) const +bool ConfigMap::save_file(std::string_view path) const { std::ostringstream stream; @@ -96,7 +96,7 @@ bool io::ConfigMap::save_file(std::string_view path) const return false; } -bool io::ConfigMap::set_value(std::string_view name, std::string_view value) +bool ConfigMap::set_value(std::string_view name, std::string_view value) { auto kv_pair = m_values.find(std::string(name)); @@ -108,7 +108,7 @@ bool io::ConfigMap::set_value(std::string_view name, std::string_view value) return false; } -std::string_view io::ConfigMap::get_value(std::string_view name) const +std::string_view ConfigMap::get_value(std::string_view name) const { auto kv_pair = m_values.find(std::string(name)); if(kv_pair != m_values.cend()) { @@ -118,12 +118,12 @@ std::string_view io::ConfigMap::get_value(std::string_view name) const return std::string_view(); } -void io::ConfigMap::add_value(std::string_view name, config::IValue& vref) +void ConfigMap::add_value(std::string_view name, config::IValue& vref) { m_values.insert_or_assign(std::string(name), &vref); } -const config::IValue* io::ConfigMap::find(std::string_view name) const +const config::IValue* ConfigMap::find(std::string_view name) const { auto kv_pair = m_values.find(std::string(name)); |
