changeset 6285:3e2faa1f190c draft

(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)
author KUDr <KUDr@openttd.org>
date Sat, 10 Mar 2007 20:05:31 +0000
parents 7fa692c72948
children a04d2e1b80be
files src/station_gui.cpp src/stdafx.h
diffstat 2 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/station_gui.cpp
+++ b/src/station_gui.cpp
@@ -269,7 +269,8 @@
 	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 @@
 
 	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);
--- 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>