summaryrefslogtreecommitdiff
path: root/src/station_gui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/station_gui.cpp')
-rw-r--r--src/station_gui.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/station_gui.cpp b/src/station_gui.cpp
index c7af3a90c..98115f973 100644
--- a/src/station_gui.cpp
+++ b/src/station_gui.cpp
@@ -269,7 +269,8 @@ static void SortStationsList(plstations_d *sl)
sl->flags &= ~SL_RESORT;
}
-static uint32 _cargo_filter = std::numeric_limits<uint32>::max();
+static const uint32 _cargo_filter_max = ~0;
+static uint32 _cargo_filter = _cargo_filter_max;
static void PlayerStationsWndProc(Window *w, WindowEvent *e)
{
@@ -282,7 +283,7 @@ static void PlayerStationsWndProc(Window *w, WindowEvent *e)
switch (e->event) {
case WE_CREATE: /* set up resort timer */
- if (_cargo_filter == std::numeric_limits<uint32>::max()) _cargo_filter = _cargo_mask;
+ if (_cargo_filter == _cargo_filter_max) _cargo_filter = _cargo_mask;
for (uint i = 0; i < 5; i++) {
if (HASBIT(facilities, i)) LowerWindowWidget(w, i + STATIONLIST_WIDGET_TRAIN);