Fix -Wdeprecated-copy and -Wclass-memaccess warnings on GCC 9

This commit is contained in:
Jonathan G Rennison
2019-11-05 18:08:02 +00:00
parent e81697c363
commit 91ca46c774
3 changed files with 10 additions and 6 deletions

View File

@@ -194,8 +194,7 @@ SpriteID TileZoneCheckUnservedBuildingsEvaluation(TileIndex tile, Owner owner)
}
CargoArray dat;
memset(&dat, 0, sizeof(dat));
dat.Clear();
AddAcceptedCargo(tile, dat, nullptr);
if (dat[CT_MAIL] + dat[CT_PASSENGERS] == 0) {
// nothing is accepted, so now test if cargo is produced