summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2014-02-10 17:13:54 +0000
committerfrosch <frosch@openttd.org>2014-02-10 17:13:54 +0000
commit03169121c2909d007be624d45feab1843077d92d (patch)
treef870f13979219c557a61fa09ad02159f2e7cef11 /src
parent88787412b6ba8eceac27faf96425a44d230551c9 (diff)
downloadopenttd-03169121c2909d007be624d45feab1843077d92d.tar.xz
(svn r26328) -Fix: Warnings and compilation failures.
Diffstat (limited to 'src')
-rw-r--r--src/cargopacket.cpp3
-rw-r--r--src/industry_cmd.cpp4
2 files changed, 3 insertions, 4 deletions
diff --git a/src/cargopacket.cpp b/src/cargopacket.cpp
index c9457243f..3eea10a5b 100644
--- a/src/cargopacket.cpp
+++ b/src/cargopacket.cpp
@@ -868,5 +868,4 @@ uint StationCargoList::Reroute(uint max_move, StationCargoList *dest, StationID
*/
template class CargoList<VehicleCargoList, CargoPacketList>;
template class CargoList<StationCargoList, StationCargoPacketMap>;
-template uint VehicleCargoList::Reassign<VehicleCargoList::MTA_DELIVER, VehicleCargoList::MTA_KEEP>(uint max_move, TileOrStationID);
-template uint VehicleCargoList::Reassign<VehicleCargoList::MTA_DELIVER, VehicleCargoList::MTA_TRANSFER>(uint max_move, TileOrStationID next_station);
+template uint VehicleCargoList::Reassign<VehicleCargoList::MTA_DELIVER, VehicleCargoList::MTA_KEEP>(uint, TileOrStationID);
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp
index bfd25fb5e..6cd4c2902 100644
--- a/src/industry_cmd.cpp
+++ b/src/industry_cmd.cpp
@@ -1566,7 +1566,7 @@ static CommandCost CheckIfFarEnoughFromConflictingIndustry(TileIndex tile, int t
const Industry *i = NULL;
/* On a large map with many industries, it may be faster to check an area. */
- const int dmax = 14;
+ static const int dmax = 14;
if (Industry::GetNumItems() > (size_t) (dmax * dmax * 2)) {
const int tx = TileX(tile);
const int ty = TileY(tile);
@@ -1576,7 +1576,7 @@ static CommandCost CheckIfFarEnoughFromConflictingIndustry(TileIndex tile, int t
const Industry *i2 = Industry::GetByTile(atile);
if (i == i2) continue;
i = i2;
- if (DistanceMax(tile, i->location.tile) > dmax) continue;
+ if (DistanceMax(tile, i->location.tile) > (uint)dmax) continue;
if (i->type == indspec->conflicting[0] ||
i->type == indspec->conflicting[1] ||
i->type == indspec->conflicting[2]) {