(svn r26130) -Codechange: add some guards against using invalid image indices
This commit is contained in:
@@ -29,6 +29,15 @@
|
||||
static const int VEHICLE_PROFIT_MIN_AGE = DAYS_IN_YEAR * 2; ///< Only vehicles older than this have a meaningful profit.
|
||||
static const Money VEHICLE_PROFIT_THRESHOLD = 10000; ///< Threshold for a vehicle to be considered making good profit.
|
||||
|
||||
/**
|
||||
* Helper to check whether an image index is valid for a particular vehicle.
|
||||
* @param <T> The type of vehicle.
|
||||
* @param image_index The image index to check.
|
||||
* @return True iff the image index is valid.
|
||||
*/
|
||||
template <VehicleType T>
|
||||
bool IsValidImageIndex(uint8 image_index);
|
||||
|
||||
typedef Vehicle *VehicleFromPosProc(Vehicle *v, void *data);
|
||||
|
||||
void VehicleServiceInDepot(Vehicle *v);
|
||||
|
Reference in New Issue
Block a user