OpenTTD Source: IsEmptyAction Struct Reference

OpenTTD Source 1.11.0-RC1

Public Member Functions
IsEmptyAction Struct Reference

Action to check if a vehicle has no stored cargo. More...

## Public Member Functions
bool | operator() (const Vehicle *v)
| Checks if the vehicle has stored cargo. More...

## Detailed Description

Action to check if a vehicle has no stored cargo.

Definition at line 1350 of file economy.cpp.

## Member Function Documentation

## ◆ operator()()

bool IsEmptyAction::operator() | ( | const Vehicle * | v | ) |
| inline

Checks if the vehicle has stored cargo.

Parameters

  v | Vehicle to be checked.

Returns
  true if v is either empty or has only reserved cargo, false otherwise.

Definition at line 1357 of file economy.cpp.

References Vehicle::cargo, and VehicleCargoList::StoredCount().

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

- src/economy.cpp