diff options
author | fonsinchen <fonsinchen@openttd.org> | 2014-05-04 15:16:58 +0000 |
---|---|---|
committer | fonsinchen <fonsinchen@openttd.org> | 2014-05-04 15:16:58 +0000 |
commit | 20f49ecf009ab14614874f51d0b319f7e5dfb1a2 (patch) | |
tree | 67280cf564371f88c1228667503d8ec1d8828c7c | |
parent | bb269661d499352754d254c45bc3ef75a1fac370 (diff) | |
download | openttd-20f49ecf009ab14614874f51d0b319f7e5dfb1a2.tar.xz |
(svn r26558) -Fix: be more explicit about the type of iterators in the waiting cargo API
-rw-r--r-- | src/script/api/script_station.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/script/api/script_station.cpp b/src/script/api/script_station.cpp index d304f7366..2f63d71a5 100644 --- a/src/script/api/script_station.cpp +++ b/src/script/api/script_station.cpp @@ -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(); |