diff options
author | darkvater <darkvater@openttd.org> | 2004-09-12 21:49:38 +0000 |
---|---|---|
committer | darkvater <darkvater@openttd.org> | 2004-09-12 21:49:38 +0000 |
commit | e295e46e3eccd58626ce2b02aab24b96c025636b (patch) | |
tree | 849dacad3729ee4bbd27669505a1932ca301592d /town_gui.c | |
parent | 1b498bca57457a5f46cc43baef225687e312692b (diff) | |
download | openttd-e295e46e3eccd58626ce2b02aab24b96c025636b.tar.xz |
(svn r223) -Fix: Const correctness and miscellaneous fixes. Thank you Tron for your diligent fixing of warnings (and some possibly bugs) (Tron)
-CodeLayout: Remove trailing spaces and Windows linebreaks
Diffstat (limited to 'town_gui.c')
-rw-r--r-- | town_gui.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/town_gui.c b/town_gui.c index 975878a60..36d856c84 100644 --- a/town_gui.c +++ b/town_gui.c @@ -354,15 +354,15 @@ static byte _last_town_idx; static int CDECL TownNameSorter(const void *a, const void *b) { char buf1[64]; - Town *t; + const Town *t; byte val; int r; - t = DEREF_TOWN(*(byte*)a); + t = DEREF_TOWN(*(const byte*)a); SET_DPARAM32(0, t->townnameparts); GetString(buf1, t->townnametype); - if ( (val=*(byte*)b) != _last_town_idx) { + if ( (val=*(const byte*)b) != _last_town_idx) { _last_town_idx = val; t = DEREF_TOWN(val); SET_DPARAM32(0, t->townnameparts); @@ -376,8 +376,8 @@ static int CDECL TownNameSorter(const void *a, const void *b) static int CDECL TownPopSorter(const void *a, const void *b) { - Town *ta = DEREF_TOWN(*(byte*)a); - Town *tb = DEREF_TOWN(*(byte*)b); + const Town *ta = DEREF_TOWN(*(const byte*)a); + const Town *tb = DEREF_TOWN(*(const byte*)b); int r = ta->population - tb->population; if (_town_sort_order & 1) r = -r; return r; |