summaryrefslogtreecommitdiff
path: root/src/map/guild.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-10-11 16:11:43 +0300
committerAndrei Karas <akaras@inbox.ru>2015-10-11 16:11:43 +0300
commit6c0f05b05e9bf09f40df3e3fe7f768f7435abcec (patch)
tree6973517e1821f128b36955fc258419131b98f7fc /src/map/guild.c
parentd70d9d4d19f0deae2a2aceb047872611d5047ae0 (diff)
parent845139091f0305d264800491ce25152856c20374 (diff)
downloadhercules-6c0f05b05e9bf09f40df3e3fe7f768f7435abcec.tar.gz
hercules-6c0f05b05e9bf09f40df3e3fe7f768f7435abcec.tar.bz2
hercules-6c0f05b05e9bf09f40df3e3fe7f768f7435abcec.tar.xz
hercules-6c0f05b05e9bf09f40df3e3fe7f768f7435abcec.zip
Merge pull request #760 from HerculesWS/738-vectors
Change several variable-size array to VECTOR (common, char)
Diffstat (limited to 'src/map/guild.c')
-rw-r--r--src/map/guild.c23
1 files changed, 2 insertions, 21 deletions
diff --git a/src/map/guild.c b/src/map/guild.c
index 7a187b625..f8798f821 100644
--- a/src/map/guild.c
+++ b/src/map/guild.c
@@ -1763,16 +1763,7 @@ int guild_broken(int guild_id,int flag)
if( g->instance )
aFree(g->instance);
- if( g->hdata )
- {
- for( i = 0; i < g->hdatac; i++ ) {
- if( g->hdata[i]->flag.free ) {
- aFree(g->hdata[i]->data);
- }
- aFree(g->hdata[i]);
- }
- aFree(g->hdata);
- }
+ HPM->data_store_destroy(&g->hdata);
idb_remove(guild->db,guild_id);
return 0;
@@ -2250,7 +2241,6 @@ void do_init_guild(bool minimal) {
void do_final_guild(void) {
DBIterator *iter = db_iterator(guild->db);
struct guild *g;
- int i;
for( g = dbi_first(iter); dbi_exists(iter); g = dbi_next(iter) ) {
if( g->channel != NULL )
@@ -2259,16 +2249,7 @@ void do_final_guild(void) {
aFree(g->instance);
g->instance = NULL;
}
- if( g->hdata )
- {
- for( i = 0; i < g->hdatac; i++ ) {
- if( g->hdata[i]->flag.free ) {
- aFree(g->hdata[i]->data);
- }
- aFree(g->hdata[i]);
- }
- aFree(g->hdata);
- }
+ HPM->data_store_destroy(&g->hdata);
}
dbi_destroy(iter);