summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-01-12 21:38:49 +0000
committertron <tron@openttd.org>2005-01-12 21:38:49 +0000
commitf062187e4709cd13b3001665d1b48cfe36150e8e (patch)
tree19e9164fd10a65968927bb53da5da2281e21b6f8
parent45233a7e168683ff5d925a296892f1eacf736a81 (diff)
downloadopenttd-f062187e4709cd13b3001665d1b48cfe36150e8e.tar.xz
(svn r1492) Reduce strcpy(, "") follwed by strcat() to just strcpy() (Jango)
-rw-r--r--namegen.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/namegen.c b/namegen.c
index d9480a987..e6fee0daa 100644
--- a/namegen.c
+++ b/namegen.c
@@ -184,22 +184,19 @@ static byte MakeGermanTownName(byte *buf, uint32 seed)
static byte MakeSpanishTownName(byte *buf, uint32 seed)
{
- strcpy(buf, "");
- strcat(buf, name_spanish_1[GetNumberBasedOnSeed(0, lengthof(name_spanish_1), seed)]);
+ strcpy(buf, name_spanish_1[GetNumberBasedOnSeed(0, lengthof(name_spanish_1), seed)]);
return 0;
}
static byte MakeFrenchTownName(byte *buf, uint32 seed)
{
- strcpy(buf, "");
- strcat(buf, name_french_1[GetNumberBasedOnSeed(0, lengthof(name_french_1), seed)]);
+ strcpy(buf, name_french_1[GetNumberBasedOnSeed(0, lengthof(name_french_1), seed)]);
return 0;
}
static byte MakeSillyTownName(byte *buf, uint32 seed)
{
- strcpy(buf, "");
- strcat(buf, name_silly_1[GetNumberBasedOnSeed( 0, lengthof(name_silly_1), seed)]);
+ strcpy(buf, name_silly_1[GetNumberBasedOnSeed( 0, lengthof(name_silly_1), seed)]);
strcat(buf, name_silly_2[GetNumberBasedOnSeed(16, lengthof(name_silly_2), seed)]);
return 0;
}
@@ -316,22 +313,19 @@ static byte MakePolishTownName(byte *buf, uint32 seed)
static byte MakeCzechTownName(byte *buf, uint32 seed)
{
- strcpy(buf, "");
- strcat(buf, name_czech_1[GetNumberBasedOnSeed(0, lengthof(name_czech_1), seed)]);
+ strcpy(buf, name_czech_1[GetNumberBasedOnSeed(0, lengthof(name_czech_1), seed)]);
return 0;
}
static byte MakeRomanianTownName(byte *buf, uint32 seed)
{
- strcpy(buf, "");
- strcat(buf, name_romanian_1[GetNumberBasedOnSeed(0, lengthof(name_romanian_1), seed)]);
+ strcpy(buf, name_romanian_1[GetNumberBasedOnSeed(0, lengthof(name_romanian_1), seed)]);
return 0;
}
static byte MakeSlovakTownName(byte *buf, uint32 seed)
{
- strcpy(buf, "");
- strcat(buf, name_slovakish_1[GetNumberBasedOnSeed(0, lengthof(name_slovakish_1), seed)]);
+ strcpy(buf, name_slovakish_1[GetNumberBasedOnSeed(0, lengthof(name_slovakish_1), seed)]);
return 0;
}