CheckCaches: Improve VehicleCargoList/StationCargoList cache checks

Log failures with details instead of just asserting
This commit is contained in:
Jonathan G Rennison
2023-04-22 22:50:18 +01:00
parent 08e43a0814
commit 1350e23e29
2 changed files with 57 additions and 16 deletions

View File

@@ -279,6 +279,20 @@ public:
return this->count == 0 ? 0 : this->cargo_days_in_transit / this->count;
}
/**
* Returns sum of cargo, including reserved cargo.
* @return Sum of cargo.
*/
inline uint TotalCount() const
{
return this->count;
}
inline uint64 CargoDaysInTransit() const
{
return this->cargo_days_in_transit;
}
void InvalidateCache();
};
@@ -399,15 +413,6 @@ public:
return this->count - this->action_counts[MTA_LOAD];
}
/**
* Returns sum of cargo, including reserved cargo.
* @return Sum of cargo.
*/
inline uint TotalCount() const
{
return this->count;
}
/**
* Returns sum of reserved cargo.
* @return Sum of reserved cargo.