From 933c40667868c4a57fc16e96f2cc7b2f1508a329 Mon Sep 17 00:00:00 2001 From: KUDr Date: Fri, 9 Mar 2007 23:26:21 +0000 Subject: (svn r9081) -Fix(r9080): UINT32_MAX is undefined on MSVC. Use std::numeric_limits::max() instead. --- src/station_gui.cpp | 4 ++-- src/stdafx.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/station_gui.cpp b/src/station_gui.cpp index a4c4c655d..c7af3a90c 100644 --- a/src/station_gui.cpp +++ b/src/station_gui.cpp @@ -269,7 +269,7 @@ static void SortStationsList(plstations_d *sl) sl->flags &= ~SL_RESORT; } -static uint32 _cargo_filter = UINT32_MAX; +static uint32 _cargo_filter = std::numeric_limits::max(); static void PlayerStationsWndProc(Window *w, WindowEvent *e) { @@ -282,7 +282,7 @@ static void PlayerStationsWndProc(Window *w, WindowEvent *e) switch (e->event) { case WE_CREATE: /* set up resort timer */ - if (_cargo_filter == UINT32_MAX) _cargo_filter = _cargo_mask; + if (_cargo_filter == std::numeric_limits::max()) _cargo_filter = _cargo_mask; for (uint i = 0; i < 5; i++) { if (HASBIT(facilities, i)) LowerWindowWidget(w, i + STATIONLIST_WIDGET_TRAIN); diff --git a/src/stdafx.h b/src/stdafx.h index 3c9419f84..faea27f11 100644 --- a/src/stdafx.h +++ b/src/stdafx.h @@ -20,6 +20,8 @@ # define INT64_MAX 9223372036854775807LL #endif +#include + #include #include #include -- cgit v1.2.3-54-g00ecf