summaryrefslogtreecommitdiff
path: root/src/ini_load.cpp
diff options
context:
space:
mode:
authorrubidium42 <rubidium@openttd.org>2021-04-29 19:04:27 +0200
committerrubidium42 <rubidium42@users.noreply.github.com>2021-05-13 23:13:17 +0200
commita032714dc4ca2b620af1ba9a444840d46ec9326f (patch)
tree9a97d456de8f1fdeb7c65dd5d38ad0304182da81 /src/ini_load.cpp
parent95386dc2b8404519c91b9e0ad728c39fb1d9e118 (diff)
downloadopenttd-a032714dc4ca2b620af1ba9a444840d46ec9326f.tar.xz
Codechange: move script settings to std::string
Diffstat (limited to 'src/ini_load.cpp')
-rw-r--r--src/ini_load.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/ini_load.cpp b/src/ini_load.cpp
index 5c208548f..33bb46b12 100644
--- a/src/ini_load.cpp
+++ b/src/ini_load.cpp
@@ -38,13 +38,9 @@ IniItem::~IniItem()
* Replace the current value with another value.
* @param value the value to replace with.
*/
-void IniItem::SetValue(const char *value)
+void IniItem::SetValue(const std::string_view value)
{
- if (value == nullptr) {
- this->value.reset();
- } else {
- this->value.emplace(value);
- }
+ this->value.emplace(value);
}
/**