Codechange: Replace C-style casts to size_t with static_cast. (#12455)
* Codechange: Replace C-style casts to size_t with static_cast. This touches only simple value-type casts. * Codechange: Replace static_cast<size_t>(-1) with SIZE_MAX Co-authored-by: Rubidium <rubidium@openttd.org>
This commit is contained in:
@@ -174,7 +174,7 @@ public:
|
||||
|
||||
void Load(Town *t) const override
|
||||
{
|
||||
size_t length = IsSavegameVersionBefore(SLV_SAVELOAD_LIST_LENGTH) ? (size_t)TAE_END : SlGetStructListLength(TAE_END);
|
||||
size_t length = IsSavegameVersionBefore(SLV_SAVELOAD_LIST_LENGTH) ? static_cast<size_t>(TAE_END) : SlGetStructListLength(TAE_END);
|
||||
for (size_t i = 0; i < length; i++) {
|
||||
SlObject(&t->received[i], this->GetLoadDescription());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user