summaryrefslogtreecommitdiff
path: root/src/map/map.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2015-09-17 01:21:28 +0200
committerHaru <haru@dotalux.com>2015-10-11 00:24:22 +0200
commit70265291d62280c525adc317158e9f531e0147ff (patch)
tree8beae9d0edc99a38bc678b86f2709780314ad327 /src/map/map.c
parent502703d2b632125b35a2b8d341a90a13d7445f02 (diff)
downloadhercules-70265291d62280c525adc317158e9f531e0147ff.tar.gz
hercules-70265291d62280c525adc317158e9f531e0147ff.tar.bz2
hercules-70265291d62280c525adc317158e9f531e0147ff.tar.xz
hercules-70265291d62280c525adc317158e9f531e0147ff.zip
Cleanup of the HPluginData implementation (First part)
- Several explicit casts are removed, to have a slightly better type-checking at compile time. - A destructor function is provided, to remove code duplication. Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/map.c')
-rw-r--r--src/map/map.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/map/map.c b/src/map/map.c
index e01a25366..0ed7072d2 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -3239,16 +3239,8 @@ void do_final_maps(void) {
if( map->list[i].qi_data )
aFree(map->list[i].qi_data);
- if( map->list[i].hdata )
- {
- for( v = 0; v < map->list[i].hdatac; v++ ) {
- if( map->list[i].hdata[v]->flag.free ) {
- aFree(map->list[i].hdata[v]->data);
- }
- aFree(map->list[i].hdata[v]);
- }
- aFree(map->list[i].hdata);
- }
+ HPM->data_store_destroy(map->list[i].hdata);
+ map->list[i].hdata = NULL;
}
map->zone_db_clear();