SimpleConfig: Put was setting key=key, not key=value.

This commit is contained in:
Kyle Isom 2023-10-24 13:22:54 -07:00
parent 33675c18ec
commit 94672bba98
2 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.22) cmake_minimum_required(VERSION 3.22)
project(scsl LANGUAGES CXX project(scsl LANGUAGES CXX
VERSION 1.1.2 VERSION 1.1.3
DESCRIPTION "Shimmering Clarity Standard Library") DESCRIPTION "Shimmering Clarity Standard Library")
set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD 14)

View File

@ -220,7 +220,7 @@ SimpleConfig::Get(const char *key, std::string defaultValue)
void void
SimpleConfig::Put(std::string &key, const std::string value) SimpleConfig::Put(std::string &key, const std::string value)
{ {
this->vars[key] = std::move(key); this->vars[key] = std::move(value);
} }
@ -228,7 +228,7 @@ void
SimpleConfig::Put(const char *key, const std::string value) SimpleConfig::Put(const char *key, const std::string value)
{ {
auto keyStr = std::string(key); auto keyStr = std::string(key);
this->vars[std::move(keyStr)] = std::move(key); this->vars[std::move(keyStr)] = std::move(value);
} }