Fix: comparison of narrow type with wide type in loop condition

Technically this can't be triggered with the currently returned values though.
This commit is contained in:
Rubidium 2023-01-02 22:51:21 +01:00 committed by rubidium42
parent e00996a18a
commit 3c54344825
2 changed files with 2 additions and 2 deletions

View File

@ -392,7 +392,7 @@ public:
}
size_t num_cargo = this->GetNumCargo();
for (CargoID i = 0; i < num_cargo; i++) {
for (size_t i = 0; i < num_cargo; i++) {
GoodsEntry *ge = &st->goods[i];
SlObject(ge, this->GetLoadDescription());
if (IsSavegameVersionBefore(SLV_183)) {

View File

@ -148,7 +148,7 @@ public:
void Load(Town *t) const override
{
size_t num_cargo = this->GetNumCargo();
for (CargoID i = 0; i < num_cargo; i++) {
for (size_t i = 0; i < num_cargo; i++) {
SlObject(&t->supplied[i], this->GetLoadDescription());
}
}