Mercurial > hg > openttd
changeset 4355:668699e4de17 draft
(svn r6056) -Codechange: don't use a loop what can be done with a simple wrapper
author | truelight <truelight@openttd.org> |
---|---|
date | Tue, 22 Aug 2006 20:56:08 +0000 |
parents | 957b7fc45ad6 |
children | 5b2e9ec44512 |
files | town_cmd.c |
diffstat | 1 files changed, 1 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/town_cmd.c +++ b/town_cmd.c @@ -1063,9 +1063,7 @@ // give it a last try, but now more aggressive if (num == 0 && CreateRandomTown(10000, 0) == NULL) { - const Town* t; - - FOR_ALL_TOWNS(t) return true; + if (GetTownArraySize() > 0) return true; //XXX can we handle that more gracefully? if (num == 0 && _game_mode != GM_EDITOR) {