summaryrefslogtreecommitdiff
path: root/strings.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-11-13 13:43:55 +0000
committertron <tron@openttd.org>2005-11-13 13:43:55 +0000
commit81e5b16d7178f0ee5584201cb2f6c8e36742354f (patch)
tree385ce09aff7cf19e072a627e83e91fe8a5f3fb3b /strings.c
parentd97f56b4e2b6159e696128932da28b89a13a30e0 (diff)
downloadopenttd-81e5b16d7178f0ee5584201cb2f6c8e36742354f.tar.xz
(svn r3172) static, const
Diffstat (limited to 'strings.c')
-rw-r--r--strings.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/strings.c b/strings.c
index d732c9ea1..77c891efe 100644
--- a/strings.c
+++ b/strings.c
@@ -702,10 +702,9 @@ static char *FormatString(char *buff, const char *str, const int32 *argv, uint c
} break;
case 0x9A: { // {STATION}
- Station *st;
+ const Station* st = GetStation(GetInt32(&argv));
int32 temp[2];
- st = GetStation(GetInt32(&argv));
if (st->xy == 0) { // station doesn't exist anymore
buff = GetStringWithArgs(buff, STR_UNKNOWN_DESTINATION, NULL);
break;
@@ -716,10 +715,10 @@ static char *FormatString(char *buff, const char *str, const int32 *argv, uint c
break;
}
case 0x9B: { // {TOWN}
- Town *t;
+ const Town* t = GetTown(GetInt32(&argv));
int32 temp[1];
- t = GetTown(GetInt32(&argv));
assert(t->xy);
+
temp[0] = t->townnameparts;
buff = GetStringWithArgs(buff, t->townnametype, temp);
break;