File diff r18781:e1de9a06f7cd → r18782:6453522c2154
src/cargopacket.h
Show inline comments
 
@@ -69,7 +69,7 @@ public:
 
	 * Gets the number of 'items' in this packet.
 
	 * @return Item count.
 
	 */
 
	FORCEINLINE uint16 Count() const
 
	inline uint16 Count() const
 
	{
 
		return this->count;
 
	}
 
@@ -79,7 +79,7 @@ public:
 
	 * the feeder chain.
 
	 * @return Feeder share.
 
	 */
 
	FORCEINLINE Money FeederShare() const
 
	inline Money FeederShare() const
 
	{
 
		return this->feeder_share;
 
	}
 
@@ -90,7 +90,7 @@ public:
 
	 * it is capped at 255.
 
	 * @return Length this cargo has been in transit.
 
	 */
 
	FORCEINLINE byte DaysInTransit() const
 
	inline byte DaysInTransit() const
 
	{
 
		return this->days_in_transit;
 
	}
 
@@ -99,7 +99,7 @@ public:
 
	 * Gets the type of the cargo's source. industry, town or head quarter.
 
	 * @return Source type.
 
	 */
 
	FORCEINLINE SourceType SourceSubsidyType() const
 
	inline SourceType SourceSubsidyType() const
 
	{
 
		return this->source_type;
 
	}
 
@@ -108,7 +108,7 @@ public:
 
	 * Gets the ID of the cargo's source. An IndustryID, TownID or CompanyID.
 
	 * @return Source ID.
 
	 */
 
	FORCEINLINE SourceID SourceSubsidyID() const
 
	inline SourceID SourceSubsidyID() const
 
	{
 
		return this->source_id;
 
	}
 
@@ -117,7 +117,7 @@ public:
 
	 * Gets the ID of the station where the cargo was loaded for the first time.
 
	 * @return StationID.
 
	 */
 
	FORCEINLINE SourceID SourceStation() const
 
	inline SourceID SourceStation() const
 
	{
 
		return this->source;
 
	}
 
@@ -126,7 +126,7 @@ public:
 
	 * Gets the coordinates of the cargo's source station.
 
	 * @return Source station's coordinates.
 
	 */
 
	FORCEINLINE TileIndex SourceStationXY() const
 
	inline TileIndex SourceStationXY() const
 
	{
 
		return this->source_xy;
 
	}
 
@@ -135,7 +135,7 @@ public:
 
	 * Gets the coordinates of the cargo's last loading station.
 
	 * @return Last loading station's coordinates.
 
	 */
 
	FORCEINLINE TileIndex LoadedAtXY() const
 
	inline TileIndex LoadedAtXY() const
 
	{
 
		return this->loaded_at_xy;
 
	}
 
@@ -203,7 +203,7 @@ public:
 
	 * Returns a pointer to the cargo packet list (so you can iterate over it etc).
 
	 * @return Pointer to the packet list.
 
	 */
 
	FORCEINLINE const List *Packets() const
 
	inline const List *Packets() const
 
	{
 
		return &this->packets;
 
	}
 
@@ -212,7 +212,7 @@ public:
 
	 * Checks whether this list is empty.
 
	 * @return True if and only if the list is empty.
 
	 */
 
	FORCEINLINE bool Empty() const
 
	inline bool Empty() const
 
	{
 
		return this->count == 0;
 
	}
 
@@ -221,7 +221,7 @@ public:
 
	 * Returns the number of cargo entities in this list.
 
	 * @return The before mentioned number.
 
	 */
 
	FORCEINLINE uint Count() const
 
	inline uint Count() const
 
	{
 
		return this->count;
 
	}
 
@@ -230,7 +230,7 @@ public:
 
	 * Returns source of the first cargo packet in this list.
 
	 * @return The before mentioned source.
 
	 */
 
	FORCEINLINE StationID Source() const
 
	inline StationID Source() const
 
	{
 
		return this->Empty() ? INVALID_STATION : this->packets.front()->source;
 
	}
 
@@ -239,7 +239,7 @@ public:
 
	 * Returns average number of days in transit for a cargo entity.
 
	 * @return The before mentioned number.
 
	 */
 
	FORCEINLINE uint DaysInTransit() const
 
	inline uint DaysInTransit() const
 
	{
 
		return this->count == 0 ? 0 : this->cargo_days_in_transit / this->count;
 
	}
 
@@ -277,7 +277,7 @@ public:
 
	 * Returns total sum of the feeder share for all packets.
 
	 * @return The before mentioned number.
 
	 */
 
	FORCEINLINE Money FeederShare() const
 
	inline Money FeederShare() const
 
	{
 
		return this->feeder_share;
 
	}