mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r26558) -Fix: be more explicit about the type of iterators in the waiting cargo API
This commit is contained in:
parent
bb269661d4
commit
20f49ecf00
|
@ -54,7 +54,9 @@ template<bool Tfrom, bool Tvia>
|
|||
uint16 cargo_count = 0;
|
||||
std::pair<StationCargoList::ConstIterator, StationCargoList::ConstIterator> range = Tvia ?
|
||||
cargo_list.Packets()->equal_range(via_station_id) :
|
||||
std::make_pair(cargo_list.Packets()->begin(), cargo_list.Packets()->end());
|
||||
std::make_pair<StationCargoList::ConstIterator, StationCargoList::ConstIterator>(
|
||||
StationCargoList::ConstIterator(cargo_list.Packets()->begin()),
|
||||
StationCargoList::ConstIterator(cargo_list.Packets()->end()));
|
||||
for (StationCargoList::ConstIterator it = range.first; it != range.second; it++) {
|
||||
const CargoPacket *cp = *it;
|
||||
if (!Tfrom || cp->SourceStation() == from_station_id) cargo_count += cp->Count();
|
||||
|
|
Loading…
Reference in New Issue