Codechange: Add a std::string overload for StrMakeValidInPlace() and a moving std::string&& overload for StrMakeValid(). (#13962)

This commit is contained in:
frosch
2025-04-07 18:22:47 +02:00
committed by GitHub
parent 981b2a94db
commit 2cdf2bedfa
8 changed files with 38 additions and 9 deletions

View File

@@ -396,7 +396,7 @@ static std::string GetFileTitle(const std::string &file, Subdirectory subdir)
size_t read = fread(title, 1, lengthof(title), *f);
assert(read <= lengthof(title));
return StrMakeValid({title, read});
return StrMakeValid(std::string_view{title, read});
}
/**