summaryrefslogtreecommitdiff
path: root/src/map/party.c
diff options
context:
space:
mode:
authorLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-27 06:38:17 +0000
committerLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-27 06:38:17 +0000
commit3c8999edce9e1f0d5c0dee3ff8311e781d64c684 (patch)
treed066567a720e5fad02e6f857d55bc165d9a3809a /src/map/party.c
parentea320701794515d4ffa6a8e8ff8f3b8fdfe09860 (diff)
downloadhercules-3c8999edce9e1f0d5c0dee3ff8311e781d64c684.tar.gz
hercules-3c8999edce9e1f0d5c0dee3ff8311e781d64c684.tar.bz2
hercules-3c8999edce9e1f0d5c0dee3ff8311e781d64c684.tar.xz
hercules-3c8999edce9e1f0d5c0dee3ff8311e781d64c684.zip
* Optional macro MEMSET_TURBO for faster low-level memory initializations.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8499 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/party.c')
-rw-r--r--src/map/party.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/map/party.c b/src/map/party.c
index 650b8b7c2..10ab78e5b 100644
--- a/src/map/party.c
+++ b/src/map/party.c
@@ -194,7 +194,7 @@ static void* create_party(DBKey key, va_list args) {
static void party_check_state(struct party_data *p)
{
int i;
- memset(&p->state, 0, sizeof(p->state));
+ malloc_set(&p->state, 0, sizeof(p->state));
for (i = 0; i < MAX_PARTY; i ++)
{
if (!p->party.member[i].online) continue; //Those not online shouldn't aport to skill usage and all that.
@@ -230,8 +230,8 @@ int party_recv_info(struct party *sp)
if (!p->party.party_id) //party just received.
party_check_member(sp);
memcpy(&p->party,sp,sizeof(struct party));
- memset(&p->state, 0, sizeof(p->state));
- memset(&p->data, 0, sizeof(p->data));
+ malloc_set(&p->state, 0, sizeof(p->state));
+ malloc_set(&p->data, 0, sizeof(p->data));
for(i=0;i<MAX_PARTY;i++){
if (!p->party.member[i].account_id)
continue;
@@ -416,8 +416,8 @@ int party_member_leaved(int party_id,int account_id,int char_id)
if(p->party.member[i].account_id==account_id &&
p->party.member[i].char_id==char_id){
clif_party_leaved(p,sd,account_id,p->party.member[i].name,0x00);
- memset(&p->party.member[i], 0, sizeof(p->party.member[0]));
- memset(&p->data[i], 0, sizeof(p->data[0]));
+ malloc_set(&p->party.member[i], 0, sizeof(p->party.member[0]));
+ malloc_set(&p->data[i], 0, sizeof(p->data[0]));
p->party.count--;
party_check_state(p);
break;
@@ -566,7 +566,7 @@ int party_send_logout(struct map_session_data *sd)
for(i=0;i<MAX_PARTY && p->data[i].sd != sd;i++);
if (i < MAX_PARTY)
- memset(&p->data[i], 0, sizeof(p->data[0]));
+ malloc_set(&p->data[i], 0, sizeof(p->data[0]));
return 1;
}