diff options
Diffstat (limited to 'src/cargomonitor.cpp')
-rw-r--r-- | src/cargomonitor.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cargomonitor.cpp b/src/cargomonitor.cpp index 7e0ba9761..b1d52d6b1 100644 --- a/src/cargomonitor.cpp +++ b/src/cargomonitor.cpp @@ -69,7 +69,7 @@ void ClearCargoDeliveryMonitoring(CompanyID company) * @param keep_monitoring After returning from this call, continue monitoring. * @return Amount collected since last query/activation for the monitored combination. */ -static uint32 GetAmount(CargoMonitorMap &monitor_map, CargoMonitorID monitor, bool keep_monitoring) +static int32 GetAmount(CargoMonitorMap &monitor_map, CargoMonitorID monitor, bool keep_monitoring) { CargoMonitorMap::iterator iter = monitor_map.find(monitor); if (iter == monitor_map.end()) { @@ -79,7 +79,7 @@ static uint32 GetAmount(CargoMonitorMap &monitor_map, CargoMonitorID monitor, bo } return 0; } else { - uint32 result = iter->second; + int32 result = iter->second; iter->second = 0; if (!keep_monitoring) monitor_map.erase(iter); return result; @@ -92,7 +92,7 @@ static uint32 GetAmount(CargoMonitorMap &monitor_map, CargoMonitorID monitor, bo * @param keep_monitoring After returning from this call, continue monitoring. * @return Amount of delivered cargo for the monitored combination. */ -uint32 GetDeliveryAmount(CargoMonitorID monitor, bool keep_monitoring) +int32 GetDeliveryAmount(CargoMonitorID monitor, bool keep_monitoring) { return GetAmount(_cargo_deliveries, monitor, keep_monitoring); } @@ -104,7 +104,7 @@ uint32 GetDeliveryAmount(CargoMonitorID monitor, bool keep_monitoring) * @return Amount of picked up cargo for the monitored combination. * @note Cargo pick up is counted on final delivery, to prevent users getting credit for picking up cargo without delivering it. */ -uint32 GetPickupAmount(CargoMonitorID monitor, bool keep_monitoring) +int32 GetPickupAmount(CargoMonitorID monitor, bool keep_monitoring) { return GetAmount(_cargo_pickups, monitor, keep_monitoring); } |