diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-10-11 16:11:43 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-10-11 16:11:43 +0300 |
commit | 6c0f05b05e9bf09f40df3e3fe7f768f7435abcec (patch) | |
tree | 6973517e1821f128b36955fc258419131b98f7fc /src/map/pc.c | |
parent | d70d9d4d19f0deae2a2aceb047872611d5047ae0 (diff) | |
parent | 845139091f0305d264800491ce25152856c20374 (diff) | |
download | hercules-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/pc.c')
-rw-r--r-- | src/map/pc.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index dc7014701..99f5b867e 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -11332,14 +11332,7 @@ void pc_autotrade_populate(struct map_session_data *sd) { pc->autotrade_update(sd,PAUC_START); - for(i = 0; i < data->hdatac; i++ ) { - if( data->hdata[i]->flag.free ) { - aFree(data->hdata[i]->data); - } - aFree(data->hdata[i]); - } - if( data->hdata ) - aFree(data->hdata); + HPM->data_store_destroy(&data->hdata); idb_remove(pc->at_db, sd->status.char_id); } @@ -11349,16 +11342,7 @@ void pc_autotrade_populate(struct map_session_data *sd) { */ int pc_autotrade_final(DBKey key, DBData *data, va_list ap) { struct autotrade_vending* at_v = DB->data2ptr(data); - int i; - for(i = 0; i < at_v->hdatac; i++ ) { - if( at_v->hdata[i]->flag.free ) { - aFree(at_v->hdata[i]->data); - } - aFree(at_v->hdata[i]); - } - if( at_v->hdata ) - aFree(at_v->hdata); - + HPM->data_store_destroy(&at_v->hdata); return 0; } |