diff options
author | Darkvater <Darkvater@openttd.org> | 2006-10-12 15:38:37 +0000 |
---|---|---|
committer | Darkvater <Darkvater@openttd.org> | 2006-10-12 15:38:37 +0000 |
commit | bc20a1539ac9db480a7511736a4cf327b2968544 (patch) | |
tree | f984eeaca9ec356907c9cfde79a378586f71932b | |
parent | f2fd789cc635f6bdce0d52803676ed74db866616 (diff) | |
download | openttd-bc20a1539ac9db480a7511736a4cf327b2968544.tar.xz |
(svn r6759) -Codechange: Remove the brainheaded usage of STR_JUST_STRING to pass a StringID
-rw-r--r-- | train_gui.c | 8 | ||||
-rw-r--r-- | vehicle_gui.c | 8 |
2 files changed, 5 insertions, 11 deletions
diff --git a/train_gui.c b/train_gui.c index 7ae1a3bbe..eb919b25e 100644 --- a/train_gui.c +++ b/train_gui.c @@ -132,18 +132,16 @@ static int CDECL TrainEngineNameSorter(const void *a, const void *b) { const EngineID va = *(const EngineID*)a; const EngineID vb = *(const EngineID*)b; - char buf1[64] = "\0"; + char buf1[64]; int r; - SetDParam(0, GetCustomEngineName(va)); - GetString(buf1, STR_JUST_STRING); + GetString(buf1, GetCustomEngineName(va)); if (vb != _last_engine) { _last_engine = vb; _bufcache[0] = '\0'; - SetDParam(0, GetCustomEngineName(vb)); - GetString(_bufcache, STR_JUST_STRING); + GetString(_bufcache, GetCustomEngineName(vb)); } r = strcmp(buf1, _bufcache); // sort by name diff --git a/vehicle_gui.c b/vehicle_gui.c index a76d23a87..893182fe2 100644 --- a/vehicle_gui.c +++ b/vehicle_gui.c @@ -516,17 +516,13 @@ static int CDECL VehicleNameSorter(const void *a, const void *b) char buf1[64] = "\0"; int r; - if (va->string_id != _internal_name_sorter_id) { - SetDParam(0, va->string_id); - GetString(buf1, STR_JUST_STRING); - } + if (va->string_id != _internal_name_sorter_id) GetString(buf1, va->string_id); if (vb != _last_vehicle) { _last_vehicle = vb; _bufcache[0] = '\0'; if (vb->string_id != _internal_name_sorter_id) { - SetDParam(0, vb->string_id); - GetString(_bufcache, STR_JUST_STRING); + GetString(_bufcache, vb->string_id); } } |