(svn r11002) -Codechange: unhackify the cargo packet list saving (a little).

This commit is contained in:
rubidium
2007-08-30 12:10:32 +00:00
parent c2dcccae16
commit 6edf2d3a1b
3 changed files with 24 additions and 45 deletions

View File

@@ -16,9 +16,6 @@ void InitializeCargoPackets()
/* Clean the cargo packet pool and create 1 block in it */
_CargoPacket_pool.CleanPool();
_CargoPacket_pool.AddBlockToPool();
/* Check whether our &cargolist == &cargolist.packets "hack" works */
CargoList::AssertOnWrongPacketOffset();
}
CargoPacket::CargoPacket(StationID source, uint16 count)
@@ -87,13 +84,6 @@ extern const ChunkHandler _cargopacket_chunk_handlers[] = {
*
*/
/* static */ void CargoList::AssertOnWrongPacketOffset()
{
CargoList cl;
if ((void*)&cl != (void*)cl.Packets()) NOT_REACHED();
}
CargoList::~CargoList()
{
while (!packets.empty()) {