summaryrefslogtreecommitdiff
path: root/src/ini_load.cpp
diff options
context:
space:
mode:
authorPatric Stout <truebrain@openttd.org>2021-05-29 11:21:38 +0200
committerGitHub <noreply@github.com>2021-05-29 11:21:38 +0200
commitca9a7df7522a614b839a83e1ba9b6a7b08642b8a (patch)
tree172dedad1d930ef7699838272e779c9d7218319b /src/ini_load.cpp
parent4d74e519074bec9a07c2997715ab635ac0e8f084 (diff)
downloadopenttd-ca9a7df7522a614b839a83e1ba9b6a7b08642b8a.tar.xz
Codechange: rename str_validate to StrMakeValid(InPlace) (#9304)
This to be more explicit the function changes the value, and not returns yes/no.
Diffstat (limited to 'src/ini_load.cpp')
-rw-r--r--src/ini_load.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ini_load.cpp b/src/ini_load.cpp
index 33bb46b12..308f822be 100644
--- a/src/ini_load.cpp
+++ b/src/ini_load.cpp
@@ -22,7 +22,7 @@
*/
IniItem::IniItem(IniGroup *parent, const std::string &name) : next(nullptr)
{
- this->name = str_validate(name);
+ this->name = StrMakeValid(name);
*parent->last_item = this;
parent->last_item = &this->next;
@@ -50,7 +50,7 @@ void IniItem::SetValue(const std::string_view value)
*/
IniGroup::IniGroup(IniLoadFile *parent, const std::string &name) : next(nullptr), type(IGT_VARIABLES), item(nullptr)
{
- this->name = str_validate(name);
+ this->name = StrMakeValid(name);
this->last_item = &this->item;
*parent->last_group = this;
@@ -288,7 +288,7 @@ void IniLoadFile::LoadFromDisk(const std::string &filename, Subdirectory subdir)
if (!quoted && e == t) {
item->value.reset();
} else {
- item->value = str_validate(std::string(t));
+ item->value = StrMakeValid(std::string(t));
}
} else {
/* it's an orphan item */