summaryrefslogtreecommitdiff
path: root/src/openttd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-06-27 17:19:05 +0000
committerrubidium <rubidium@openttd.org>2007-06-27 17:19:05 +0000
commit67f46b40ab1d3869e88bdc5a6508310638dfa23d (patch)
treeb0d20222e199028e6c7ebc3a16cb76e98d6ef1b4 /src/openttd.cpp
parent3c5622ee9abec4dcc8bf938557b9c70c210a5715 (diff)
downloadopenttd-67f46b40ab1d3869e88bdc5a6508310638dfa23d.tar.xz
(svn r10358) -Codechange: remove the cargopacket leakchecker as it never asserted in almost a week of stresstesting, so I'm pretty sure all cornercases are tested by now.
Diffstat (limited to 'src/openttd.cpp')
-rw-r--r--src/openttd.cpp26
1 files changed, 0 insertions, 26 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp
index b05324862..e0060321b 100644
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -938,31 +938,6 @@ void SwitchMode(int new_mode)
}
}
-#include "cargopacket.h"
-void CheckCargoPacketLeaks()
-{
- CargoPacket *cp;
- FOR_ALL_CARGOPACKETS(cp) cp->touched = false;
-
- Vehicle *v;
- FOR_ALL_VEHICLES(v) {
- const CargoList::List *packets = v->cargo.Packets();
- for (CargoList::List::const_iterator it = packets->begin(); it != packets->end(); it++) (*it)->touched = true;
- }
-
- Station *st;
- FOR_ALL_STATIONS(st) {
- for (CargoID c = 0; c < NUM_CARGO; c++) {
- GoodsEntry *ge = &st->goods[c];
-
- const CargoList::List *packets = ge->cargo.Packets();
- for (CargoList::List::const_iterator it = packets->begin(); it != packets->end(); it++) (*it)->touched = true;
- }
- }
-
- FOR_ALL_CARGOPACKETS(cp) assert(cp->touched);
-}
-
/* State controlling game loop.
* The state must not be changed from anywhere
@@ -997,7 +972,6 @@ void StateGameLoop()
CallWindowTickEvent();
NewsLoop();
_current_player = p;
- CheckCargoPacketLeaks();
}
}