(svn r5228) Suppress MSVC warnings about signed/unsigned comparison
authorKUDr
Sun, 11 Jun 2006 21:19:51 +0000
changeset 4015 4f67e077e30e
parent 4014 7658e2cc9928
child 4016 e3c8f26fb798
(svn r5228) Suppress MSVC warnings about signed/unsigned comparison
ai/default/default.c
--- a/ai/default/default.c	Sun Jun 11 19:23:39 2006 +0000
+++ b/ai/default/default.c	Sun Jun 11 21:19:51 2006 +0000
@@ -484,7 +484,7 @@
 	if (cargo == CT_GOODS || cargo == CT_FOOD) {
 		Town* to_tow = GetTown(s->to);
 
-		if (to_tow->population < (cargo == CT_FOOD ? 200 : 900)) return; // error
+		if (to_tow->population < (cargo == CT_FOOD ? 200U : 900U)) return; // error
 		fr->to = to_tow;
 		to_xy = to_tow->xy;
 	} else {
@@ -567,7 +567,7 @@
 		// pick a dest town, and see if it's big enough
 		Town* t = AiFindRandomTown();
 
-		if (t == NULL || t->population < (cargo == CT_FOOD ? 200 : 900)) return;
+		if (t == NULL || t->population < (cargo == CT_FOOD ? 200U : 900U)) return;
 
 		fr->to = t;
 		fr->distance = DistanceManhattan(i->xy, t->xy);