(svn r16338) -Codechange: split loading of references to two phases

In the first phase, indexes are stored. In the second phase, indexes are checked for validity and converted to pointers
This commit is contained in:
smatz
2009-05-17 16:28:29 +00:00
parent 21e2842f34
commit 769de62daf
29 changed files with 231 additions and 99 deletions

View File

@@ -71,7 +71,7 @@ struct CargoPacket : PoolItem<CargoPacket, CargoPacketID, &_CargoPacket_pool> {
*/
#define FOR_ALL_CARGOPACKETS(cp) FOR_ALL_CARGOPACKETS_FROM(cp, 0)
extern void SaveLoad_STNS(Station *st);
extern const struct SaveLoad *GetGoodsDesc();
/**
* Simple collection class for a list of cargo packets
@@ -99,7 +99,7 @@ private:
uint days_in_transit; ///< Cache for the number of days in transit
public:
friend void SaveLoad_STNS(Station *st);
friend const struct SaveLoad *GetGoodsDesc();
/** Create the cargo list */
CargoList() { this->InvalidateCache(); }