mirror of https://github.com/OpenTTD/OpenTTD
Codefix: return right type to prevent casting
parent
023bf38338
commit
3c15e0c889
|
@ -403,9 +403,9 @@ static const CmdStruct *FindCmd(std::string_view s)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint ResolveCaseName(std::string_view str)
|
static uint8_t ResolveCaseName(std::string_view str)
|
||||||
{
|
{
|
||||||
uint case_idx = _lang.GetCaseIndex(str);
|
uint8_t case_idx = _lang.GetCaseIndex(str);
|
||||||
if (case_idx >= MAX_NUM_CASES) StrgenFatal("Invalid case-name '{}'", str);
|
if (case_idx >= MAX_NUM_CASES) StrgenFatal("Invalid case-name '{}'", str);
|
||||||
return case_idx + 1;
|
return case_idx + 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue