(svn r16877) -Codechange: use Subsidy::IsAwarded() instead of testing subsidy's age

This commit is contained in:
smatz
2009-07-18 19:54:35 +00:00
parent 3fcfb9b248
commit af13707e00
6 changed files with 24 additions and 15 deletions

View File

@@ -17,6 +17,15 @@ struct Subsidy {
uint16 from; ///< Index of source. Either TownID, IndustryID or StationID, when awarded
uint16 to; ///< Index of destination. Either TownID, IndustryID or StationID, when awarded
/**
* Tests whether this subsidy has been awarded to someone
* @return is this subsidy awarded?
*/
FORCEINLINE bool IsAwarded() const
{
return this->age >= 12;
}
/**
* Determines index of this subsidy
* @return index (in the Subsidy::array array)