summaryrefslogtreecommitdiff
path: root/src/townname.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/townname.cpp')
-rw-r--r--src/townname.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/townname.cpp b/src/townname.cpp
index 2067fa1bb..b6d55f1ef 100644
--- a/src/townname.cpp
+++ b/src/townname.cpp
@@ -121,17 +121,17 @@ bool VerifyTownName(uint32 r, const TownNameParams *par, TownNames *town_names)
*/
bool GenerateTownName(uint32 *townnameparts, TownNames *town_names)
{
- /* Do not set too low tries, since when we run out of names, we loop
- * for #tries only one time anyway - then we stop generating more
- * towns. Do not show it too high neither, since looping through all
- * the other towns may take considerable amount of time (10000 is
- * too much). */
TownNameParams par(_settings_game.game_creation.town_name);
/* This function is called very often without entering the gameloop
* inbetween. So reset layout cache to prevent it from growing too big. */
Layouter::ReduceLineCache();
+ /* Do not set i too low, since when we run out of names, we loop
+ * for #tries only one time anyway - then we stop generating more
+ * towns. Do not set it too high either, since looping through all
+ * the other towns may take considerable amount of time (10000 is
+ * too much). */
for (int i = 1000; i != 0; i--) {
uint32 r = _generating_world ? Random() : InteractiveRandom();
if (!VerifyTownName(r, &par, town_names)) continue;
@@ -1045,7 +1045,7 @@ static const TownNameGeneratorParams _town_name_generators[] = {
/**
- * Generates town name from given seed. a language.
+ * Generates town name from given seed.
* @param buf output buffer
* @param last end of buffer
* @param lang town name language