Codechange: Use GrfSpecFeature type instead of uint8_t. (#14253)

This commit is contained in:
Peter Nelson
2025-05-12 08:44:39 +01:00
committed by GitHub
parent 2516c435b7
commit 0aacd7acb3
16 changed files with 69 additions and 66 deletions
+1 -1
View File
@@ -220,7 +220,7 @@ struct INDYChunkHandler : ChunkHandler {
if (IsSavegameVersionBefore(SLV_161) && !IsSavegameVersionBefore(SLV_76)) {
/* Store the old persistent storage. The GRFID will be added later. */
assert(PersistentStorage::CanAllocateItem());
i->psa = new PersistentStorage(0, 0, TileIndex{});
i->psa = new PersistentStorage(0, GSF_INVALID, TileIndex{});
std::copy(std::begin(_old_ind_persistent_storage.storage), std::end(_old_ind_persistent_storage.storage), std::begin(i->psa->storage));
}
if (IsSavegameVersionBefore(SLV_EXTEND_INDUSTRY_CARGO_SLOTS)) {
+1 -1
View File
@@ -399,7 +399,7 @@ public:
if (IsSavegameVersionBefore(SLV_161) && !IsSavegameVersionBefore(SLV_145) && st->facilities.Test(StationFacility::Airport)) {
/* Store the old persistent storage. The GRFID will be added later. */
assert(PersistentStorage::CanAllocateItem());
st->airport.psa = new PersistentStorage(0, 0, TileIndex{});
st->airport.psa = new PersistentStorage(0, GSF_INVALID, TileIndex{});
std::copy(std::begin(_old_st_persistent_storage.storage), std::end(_old_st_persistent_storage.storage), std::begin(st->airport.psa->storage));
}
+1 -1
View File
@@ -35,7 +35,7 @@ struct PSACChunkHandler : ChunkHandler {
while ((index = SlIterateArray()) != -1) {
assert(PersistentStorage::CanAllocateItem());
PersistentStorage *ps = new (PersistentStorageID(index)) PersistentStorage(0, 0, TileIndex{});
PersistentStorage *ps = new (PersistentStorageID(index)) PersistentStorage(0, GSF_INVALID, TileIndex{});
SlObject(ps, slt);
}
}