1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-22 03:42:41 +01:00

Codechange: Use EnumBitSet for StringValidationSettings. (#13974)

This commit is contained in:
Peter Nelson
2025-04-08 21:19:17 +01:00
committed by GitHub
parent 4e4f413913
commit 5b9d171e63
15 changed files with 38 additions and 34 deletions

View File

@@ -803,7 +803,7 @@ static std::vector<char> Xunzip(std::span<char> input)
*/
void TextfileWindow::LoadText(std::string_view buf)
{
std::string text = StrMakeValid(buf, SVS_REPLACE_WITH_QUESTION_MARK | SVS_ALLOW_NEWLINE | SVS_REPLACE_TAB_CR_NL_WITH_SPACE);
std::string text = StrMakeValid(buf, {StringValidationSetting::ReplaceWithQuestionMark, StringValidationSetting::AllowNewline, StringValidationSetting::ReplaceTabCrNlWithSpace});
this->lines.clear();
/* Split the string on newlines. */