diff options
author | rubidium <rubidium@openttd.org> | 2011-11-12 13:00:29 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2011-11-12 13:00:29 +0000 |
commit | 7fd1e1df81c3ed45e176f1bbf46d873b6cff316e (patch) | |
tree | 8f2ad83400a7897a066ff4f500bd0cdd150c1b93 /src/newgrf.cpp | |
parent | d61b90ac6fb63ee42f47ca53cacd5aa7d7b30bae (diff) | |
download | openttd-7fd1e1df81c3ed45e176f1bbf46d873b6cff316e.tar.xz |
(svn r23198) -Codechange: introduce a free that takes const pointers so we don't need to cast to void/non-const before being able to free
Diffstat (limited to 'src/newgrf.cpp')
-rw-r--r-- | src/newgrf.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp index 41bbc07a6..2afd74686 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -3071,10 +3071,10 @@ static void CleanIndustryTileTable(IndustrySpec *ind) if (HasBit(ind->cleanup_flag, CLEAN_TILELAYOUT) && ind->table != NULL) { for (int j = 0; j < ind->num_table; j++) { /* remove the individual layouts */ - free((void*)ind->table[j]); + free(ind->table[j]); } /* remove the layouts pointers */ - free((void*)ind->table); + free(ind->table); ind->table = NULL; } } @@ -3322,7 +3322,7 @@ static ChangeInfoResult IndustriesChangeInfo(uint indid, int numinfo, int prop, } if (HasBit(indsp->cleanup_flag, CLEAN_RANDOMSOUNDS)) { - free((void*)indsp->random_sounds); + free(indsp->random_sounds); } indsp->random_sounds = sounds; SetBit(indsp->cleanup_flag, CLEAN_RANDOMSOUNDS); @@ -7663,10 +7663,10 @@ static void ResetCustomAirports() /* We need to remove the tiles layouts */ for (int j = 0; j < as->num_table; j++) { /* remove the individual layouts */ - free((void*)as->table[j]); + free(as->table[j]); } - free((void*)as->table); - free((void*)as->depot_table); + free(as->table); + free(as->depot_table); free(as); } @@ -7703,7 +7703,7 @@ static void ResetCustomIndustries() /* We need to remove the sounds array */ if (HasBit(ind->cleanup_flag, CLEAN_RANDOMSOUNDS)) { - free((void*)ind->random_sounds); + free(ind->random_sounds); } /* We need to remove the tiles layouts */ |