File diff r23953:ba75d2f3b530 → r23954:8e43140b9a66
src/openttd.cpp
Show inline comments
 
@@ -1310,14 +1310,13 @@ static void CheckCaches()
 
		byte buff[sizeof(VehicleCargoList)];
 
		memcpy(buff, &v->cargo, sizeof(VehicleCargoList));
 
		v->cargo.InvalidateCache();
 
		assert(memcmp(&v->cargo, buff, sizeof(VehicleCargoList)) == 0);
 
	}
 

	
 
	Station *st;
 
	FOR_ALL_STATIONS(st) {
 
	for (Station *st : Station::Iterate()) {
 
		for (CargoID c = 0; c < NUM_CARGO; c++) {
 
			byte buff[sizeof(StationCargoList)];
 
			memcpy(buff, &st->goods[c].cargo, sizeof(StationCargoList));
 
			st->goods[c].cargo.InvalidateCache();
 
			assert(memcmp(&st->goods[c].cargo, buff, sizeof(StationCargoList)) == 0);
 
		}