void BuildingRegister::Deserialize2(SerializedGameData& sgd) { if(sgd.GetGameDataVersion() < 2) { for(unsigned i = 0; i < 30; ++i) sgd.PopObjectContainer(buildings[i], GOT_NOB_USUAL); sgd.PopObjectContainer(building_sites, GOT_BUILDINGSITE); sgd.PopObjectContainer(military_buildings, GOT_NOB_MILITARY); } }
void BuildingRegister::Deserialize(SerializedGameData& sgd) { sgd.PopObjectContainer(warehouses, GOT_UNKNOWN); sgd.PopObjectContainer(harbors, GOT_NOB_HARBORBUILDING); if(sgd.GetGameDataVersion() >= 2) { for(auto& building : buildings) sgd.PopObjectContainer(building, GOT_NOB_USUAL); sgd.PopObjectContainer(building_sites, GOT_BUILDINGSITE); sgd.PopObjectContainer(military_buildings, GOT_NOB_MILITARY); } }