Codechange: rename str_validate to StrMakeValid(InPlace) (#9304)
This to be more explicit the function changes the value, and not returns yes/no.
This commit is contained in:
@@ -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 */
|
||||
|
Reference in New Issue
Block a user