File diff r28810:dd35d3d734ac → r28811:c7d0936f4cf0
src/vehicle_base.h
Show inline comments
 
@@ -755,7 +755,7 @@ public:
 
	 * and that shall not be resetted for the new vehicle.
 
	 * @param src The old vehicle
 
	 */
 
	inline void CopyVehicleConfigAndStatistics(const Vehicle *src)
 
	inline void CopyVehicleConfigAndStatistics(Vehicle *src)
 
	{
 
		this->CopyConsistPropertiesFrom(src);
 

	
 
@@ -766,6 +766,8 @@ public:
 

	
 
		this->profit_this_year = src->profit_this_year;
 
		this->profit_last_year = src->profit_last_year;
 

	
 
		src->unitnumber = 0;
 
	}
 

	
 

	
 
@@ -1270,19 +1272,6 @@ struct SpecializedVehicle : public Vehic
 
	static Pool::IterateWrapper<T> Iterate(size_t from = 0) { return Pool::IterateWrapper<T>(from); }
 
};
 

	
 
/** Generates sequence of free UnitID numbers */
 
struct FreeUnitIDGenerator {
 
	bool *cache;  ///< array of occupied unit id numbers
 
	UnitID maxid; ///< maximum ID at the moment of constructor call
 
	UnitID curid; ///< last ID returned; 0 if none
 

	
 
	FreeUnitIDGenerator(VehicleType type, CompanyID owner);
 
	UnitID NextID();
 

	
 
	/** Releases allocated memory */
 
	~FreeUnitIDGenerator() { free(this->cache); }
 
};
 

	
 
/** Sentinel for an invalid coordinate. */
 
static const int32_t INVALID_COORD = 0x7fffffff;