summaryrefslogtreecommitdiff
path: root/src/station_gui.cpp
diff options
context:
space:
mode:
authorPeterN <peter@fuzzle.org>2018-05-21 22:08:39 +0100
committerGitHub <noreply@github.com>2018-05-21 22:08:39 +0100
commit4cebebcf683b079ff010e70b0a0a78c12734933e (patch)
tree4f140272bd8c1efba4916a642b85a22f153cb7b4 /src/station_gui.cpp
parent42b43c998314a3fcd89aa59ad7834104dd80b053 (diff)
downloadopenttd-4cebebcf683b079ff010e70b0a0a78c12734933e.tar.xz
Change: Add CargoTypes type for cargo masks. (#6790)
Diffstat (limited to 'src/station_gui.cpp')
-rw-r--r--src/station_gui.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/station_gui.cpp b/src/station_gui.cpp
index c1927bdcc..52738ab13 100644
--- a/src/station_gui.cpp
+++ b/src/station_gui.cpp
@@ -56,7 +56,7 @@
int DrawStationCoverageAreaText(int left, int right, int top, StationCoverageType sct, int rad, bool supplies)
{
TileIndex tile = TileVirtXY(_thd.pos.x, _thd.pos.y);
- uint32 cargo_mask = 0;
+ CargoTypes cargo_mask = 0;
if (_thd.drawstyle == HT_RECT && tile < MapSize()) {
CargoArray cargoes;
if (supplies) {
@@ -156,8 +156,8 @@ protected:
static Listing last_sorting;
static byte facilities; // types of stations of interest
static bool include_empty; // whether we should include stations without waiting cargo
- static const uint32 cargo_filter_max;
- static uint32 cargo_filter; // bitmap of cargo types to include
+ static const CargoTypes cargo_filter_max;
+ static CargoTypes cargo_filter; // bitmap of cargo types to include
static const Station *last_station;
/* Constants for sorting stations */
@@ -654,8 +654,8 @@ public:
Listing CompanyStationsWindow::last_sorting = {false, 0};
byte CompanyStationsWindow::facilities = FACIL_TRAIN | FACIL_TRUCK_STOP | FACIL_BUS_STOP | FACIL_AIRPORT | FACIL_DOCK;
bool CompanyStationsWindow::include_empty = true;
-const uint32 CompanyStationsWindow::cargo_filter_max = UINT32_MAX;
-uint32 CompanyStationsWindow::cargo_filter = UINT32_MAX;
+const CargoTypes CompanyStationsWindow::cargo_filter_max = ALL_CARGOTYPES;
+CargoTypes CompanyStationsWindow::cargo_filter = ALL_CARGOTYPES;
const Station *CompanyStationsWindow::last_station = NULL;
/* Availible station sorting functions */
@@ -1799,7 +1799,7 @@ struct StationViewWindow : public Window {
{
const Station *st = Station::Get(this->window_number);
- uint32 cargo_mask = 0;
+ CargoTypes cargo_mask = 0;
for (CargoID i = 0; i < NUM_CARGO; i++) {
if (HasBit(st->goods[i].status, GoodsEntry::GES_ACCEPTANCE)) SetBit(cargo_mask, i);
}