(svn r6169) -Codechange: Use GetString() instead of GetStringWithArgs() which should be

integral to strings.c
This commit is contained in:
Darkvater
2006-08-27 10:04:33 +00:00
parent 5dec21ff0f
commit 2f6a4bc1a9
6 changed files with 14 additions and 20 deletions

View File

@@ -376,18 +376,17 @@ static int CDECL TownNameSorter(const void *a, const void *b)
const Town* tb = *(const Town**)b;
char buf1[64];
int r;
int32 argv[1];
argv[0] = ta->index;
GetStringWithArgs(buf1, STR_TOWN, argv);
SetDParam(0, ta->index);
GetString(buf1, STR_TOWN);
/* If 'b' is the same town as in the last round, use the cached value
* We do this to speed stuff up ('b' is called with the same value a lot of
* times after eachother) */
if (tb != _last_town) {
_last_town = tb;
argv[0] = tb->index;
GetStringWithArgs(_bufcache, STR_TOWN, argv);
SetDParam(0, tb->index);
GetString(_bufcache, STR_TOWN);
}
r = strcmp(buf1, _bufcache);