OpenTTD Source 20250312-master-gcdcc6b491d
CargoArray Struct Reference

Class for storing amounts of cargo. More...

#include <cargo_type.h>

Inheritance diagram for CargoArray:

Public Member Functions

template<typename T >
const T GetSum () const
 Get the sum of all cargo amounts.
 
uint GetCount () const
 Get the amount of cargos that have an amount.
 

Detailed Description

Class for storing amounts of cargo.

Definition at line 113 of file cargo_type.h.

Member Function Documentation

◆ GetCount()

uint CargoArray::GetCount ( ) const
inline

Get the amount of cargos that have an amount.

Returns
The amount.

Definition at line 128 of file cargo_type.h.

Referenced by GetTrainDetailsWndVScroll().

◆ GetSum()

template<typename T >
const T CargoArray::GetSum ( ) const
inline

Get the sum of all cargo amounts.

Returns
The sum.

Definition at line 119 of file cargo_type.h.

Referenced by GetTotalCapacityOfArticulatedParts().


The documentation for this struct was generated from the following file: