mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-16 08:52:40 +01:00
Codechange: Pass span to StrValid instead of first and last - 1. (#12846)
`std::span` is used instead of `std::string_view` as this is only used for fixed-length buffers. This removes some callers of `lastof()`
This commit is contained in:
@@ -1878,12 +1878,12 @@ bool LanguagePackHeader::IsValid() const
|
||||
this->newgrflangid < MAX_LANG &&
|
||||
this->num_genders < MAX_NUM_GENDERS &&
|
||||
this->num_cases < MAX_NUM_CASES &&
|
||||
StrValid(this->name, lastof(this->name)) &&
|
||||
StrValid(this->own_name, lastof(this->own_name)) &&
|
||||
StrValid(this->isocode, lastof(this->isocode)) &&
|
||||
StrValid(this->digit_group_separator, lastof(this->digit_group_separator)) &&
|
||||
StrValid(this->digit_group_separator_currency, lastof(this->digit_group_separator_currency)) &&
|
||||
StrValid(this->digit_decimal_separator, lastof(this->digit_decimal_separator));
|
||||
StrValid(this->name) &&
|
||||
StrValid(this->own_name) &&
|
||||
StrValid(this->isocode) &&
|
||||
StrValid(this->digit_group_separator) &&
|
||||
StrValid(this->digit_group_separator_currency) &&
|
||||
StrValid(this->digit_decimal_separator);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user