summaryrefslogtreecommitdiff
path: root/town_gui.c
diff options
context:
space:
mode:
Diffstat (limited to 'town_gui.c')
-rw-r--r--town_gui.c10
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;