mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-16 08:52:40 +01:00
Codechange: use std::string_view for GetNextParameterString
This commit is contained in:
@@ -1238,16 +1238,9 @@ static void FormatString(StringBuilder &builder, std::string_view str_arg, Strin
|
||||
builder += _openttd_revision;
|
||||
break;
|
||||
|
||||
case SCC_RAW_STRING_POINTER: { // {RAW_STRING}
|
||||
const char *raw_string = args.GetNextParameterString();
|
||||
/* raw_string can be nullptr. */
|
||||
if (raw_string == nullptr) {
|
||||
builder += "(invalid RAW_STRING parameter)";
|
||||
break;
|
||||
}
|
||||
FormatString(builder, raw_string, args);
|
||||
case SCC_RAW_STRING_POINTER: // {RAW_STRING}
|
||||
FormatString(builder, args.GetNextParameterString(), args);
|
||||
break;
|
||||
}
|
||||
|
||||
case SCC_STRING: {// {STRING}
|
||||
StringID string_id = args.GetNextParameter<StringID>();
|
||||
|
||||
Reference in New Issue
Block a user