diff options
author | truelight <truelight@openttd.org> | 2006-08-22 20:56:08 +0000 |
---|---|---|
committer | truelight <truelight@openttd.org> | 2006-08-22 20:56:08 +0000 |
commit | cea8546a8663db55e9d492b68ef9836550663bbe (patch) | |
tree | 201fbda2a58cd5307db6fe58f6fac6591b99f02c | |
parent | 15aff22c965913598652666046c522eaa0c76641 (diff) | |
download | openttd-cea8546a8663db55e9d492b68ef9836550663bbe.tar.xz |
(svn r6056) -Codechange: don't use a loop what can be done with a simple wrapper
-rw-r--r-- | town_cmd.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/town_cmd.c b/town_cmd.c index 59a9945b2..dcded352b 100644 --- a/town_cmd.c +++ b/town_cmd.c @@ -1063,9 +1063,7 @@ bool GenerateTowns(void) // 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) { |