Skip to content

Commit

Permalink
-Fix: be more explicit about the type of iterators in the waiting car…
Browse files Browse the repository at this point in the history
…go API
  • Loading branch information
ulfhermann committed May 4, 2014
1 parent 177ae4a commit 3d9ea66
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/script/api/script_station.cpp
Expand Up @@ -54,7 +54,8 @@ 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(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();
Expand Down

0 comments on commit 3d9ea66

Please sign in to comment.