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:
Patric Stout
2021-05-29 11:21:38 +02:00
committed by GitHub
parent 4d74e51907
commit ca9a7df752
22 changed files with 63 additions and 62 deletions

View File

@@ -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 */