(svn r17813) -Codechange: unify the CargoPacket related coding style

This commit is contained in:
rubidium
2009-10-19 09:15:47 +00:00
parent 3adaa57a2e
commit fe575367f9
4 changed files with 23 additions and 19 deletions

View File

@@ -28,7 +28,7 @@
*/
FOR_ALL_VEHICLES(v) {
const VehicleCargoList::List *packets = v->cargo.Packets();
for (VehicleCargoList::List::const_iterator it = packets->begin(); it != packets->end(); it++) {
for (VehicleCargoList::ConstIterator it(packets->begin()); it != packets->end(); it++) {
CargoPacket *cp = *it;
cp->source_xy = Station::IsValidID(cp->source) ? Station::Get(cp->source)->xy : v->tile;
cp->loaded_at_xy = cp->source_xy;
@@ -47,7 +47,7 @@
GoodsEntry *ge = &st->goods[c];
const StationCargoList::List *packets = ge->cargo.Packets();
for (StationCargoList::List::const_iterator it = packets->begin(); it != packets->end(); it++) {
for (StationCargoList::ConstIterator it(packets->begin()); it != packets->end(); it++) {
CargoPacket *cp = *it;
cp->source_xy = Station::IsValidID(cp->source) ? Station::Get(cp->source)->xy : st->xy;
cp->loaded_at_xy = cp->source_xy;