File diff r28810:dd35d3d734ac → r28811:c7d0936f4cf0
src/company_base.h
Show inline comments
 
@@ -49,6 +49,19 @@ struct CompanyInfrastructure {
 
	uint32_t GetTramTotal() const;
 
};
 

	
 
class FreeUnitIDGenerator {
 
public:
 
	UnitID NextID() const;
 
	UnitID UseID(UnitID index);
 
	void ReleaseID(UnitID index);
 

	
 
private:
 
	using BitmapStorage = size_t;
 
	static constexpr size_t BITMAP_SIZE = std::numeric_limits<BitmapStorage>::digits;
 

	
 
	std::vector<BitmapStorage> used_bitmap;
 
};
 

	
 
typedef Pool<Company, CompanyID, 1, MAX_COMPANIES> CompanyPool;
 
extern CompanyPool _company_pool;
 

	
 
@@ -129,6 +142,8 @@ struct Company : CompanyProperties, Comp
 

	
 
	CompanyInfrastructure infrastructure; ///< NOSAVE: Counts of company owned infrastructure.
 

	
 
	FreeUnitIDGenerator freeunits[VEH_COMPANY_END];
 

	
 
	Money GetMaxLoan() const;
 

	
 
	/**