1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-16 08:52:40 +01:00

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

@@ -353,7 +353,7 @@ namespace ScriptObjectInternal {
if constexpr (std::is_same_v<std::string, T>) {
/* The string must be valid, i.e. not contain special codes. Since some
* can be made with GSText, make sure the control codes are removed. */
data = ::StrMakeValid(data, SVS_NONE);
::StrMakeValidInPlace(data, SVS_NONE);
}
}