(svn r11815) -Codechange (r11802): some compilers were giving a false warning about uninitialized variable
authorsmatz
Fri, 11 Jan 2008 22:29:47 +0000
changeset 8251 886d6a9cefef
parent 8250 900ec4fbafb5
child 8252 69bfb7671f97
(svn r11815) -Codechange (r11802): some compilers were giving a false warning about uninitialized variable
src/signal.cpp
--- a/src/signal.cpp	Fri Jan 11 18:53:52 2008 +0000
+++ b/src/signal.cpp	Fri Jan 11 22:29:47 2008 +0000
@@ -462,15 +462,13 @@
 
 	Owner owner = OWNER_NONE; // owner whose signals we are updating
 
-	while (!_globset.IsEmpty()) {
+	TileIndex tile;
+	DiagDirection dir;
+
+	while (_globset.Get(&tile, &dir)) {
 		assert(_tbuset.IsEmpty());
 		assert(_tbdset.IsEmpty());
 
-		TileIndex tile;
-		DiagDirection dir;
-
-		_globset.Get(&tile, &dir);
-
 		/* After updating signal, data stored are always MP_RAILWAY with signals.
 		 * Other situations happen when data are from outside functions -
 		 * modification of railbits (including both rail building and removal),