summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKUDr <kudr@openttd.org>2007-03-10 20:05:31 +0000
committerKUDr <kudr@openttd.org>2007-03-10 20:05:31 +0000
commit00bc8933121aa80fa7bc8365698f3b20f14df5b0 (patch)
treeb4f3209b0d7f22814ba636974e00430e817d7e7e /src
parent1a7d9dd6c0ec5f2c42596c88987c5a1a026813f9 (diff)
downloadopenttd-00bc8933121aa80fa7bc8365698f3b20f14df5b0.tar.xz
(svn r9104) -Fix(r9080, r9081): UINT32_MAX is undefined on MSVC, std::numeric_limits doesn't exist in gcc 2.95 (MorphOS), so back to tree and use ~0 instead (peter1138)
Diffstat (limited to 'src')
-rw-r--r--src/station_gui.cpp5
-rw-r--r--src/stdafx.h2
2 files changed, 3 insertions, 4 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);
diff --git a/src/stdafx.h b/src/stdafx.h
index faea27f11..3c9419f84 100644
--- a/src/stdafx.h
+++ b/src/stdafx.h
@@ -20,8 +20,6 @@
# define INT64_MAX 9223372036854775807LL
#endif
-#include <limits>
-
#include <cstdio>
#include <cstddef>
#include <cstring>