diff options
Diffstat (limited to 'plugins/ContactsPlus/src/send.h')
-rw-r--r-- | plugins/ContactsPlus/src/send.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/plugins/ContactsPlus/src/send.h b/plugins/ContactsPlus/src/send.h index c8580a4eb1..73908b4ecf 100644 --- a/plugins/ContactsPlus/src/send.h +++ b/plugins/ContactsPlus/src/send.h @@ -68,19 +68,20 @@ struct TSendContactsData { // hope uack is released automaticly, static propert ~TSendContactsData();
};
-struct TAckData {
+struct TAckData
+{
HANDLE hContact; // to whom was it sent
HANDLE* aContacts; // obj
int nContacts; // how many
TAckData(HANDLE contact) { hContact = contact; aContacts = NULL; nContacts = 0;};
- ~TAckData() { if (nContacts) SAFE_FREE((void**)&aContacts); }
+ ~TAckData() { mir_free(aContacts); }
};
typedef TAckData* PAckData;
struct TCTSend {
char* mcaUIN;
- unsigned char* mcaNick;
+ char* mcaNick;
};
struct gAckItem { // some shit here
@@ -94,10 +95,10 @@ struct gAckList { gAckItem** Items;
int Count;
TAckData* Get(HANDLE hProcc) { for (int i=0; i<Count; i++) if (Items[i]->hProcc==hProcc) { return Items[i]->ackData; }; return NULL; };
- TAckData* Add(HANDLE hProcc, TAckData* ackData) { Items=(gAckItem**)realloc(Items, (Count+1)*sizeof(gAckItem*)); Items[Count]=new gAckItem(hProcc, ackData); Count++; return ackData; };
+ TAckData* Add(HANDLE hProcc, TAckData* ackData) { Items=(gAckItem**)mir_realloc(Items, (Count+1)*sizeof(gAckItem*)); Items[Count]=new gAckItem(hProcc, ackData); Count++; return ackData; };
TAckData* Remove(HANDLE hProcc) { for (int i=0; i<Count; i++) if (Items[i]->hProcc==hProcc) { TAckData* data=Items[i]->ackData; delete Items[i]; memmove(Items+i, Items+i+1, (Count-i-1)*sizeof(gAckItem*)); Count--; return data; }; return NULL; };
gAckList() { Count = 0; Items = NULL; }
- ~gAckList() { if (Count) { for (int i=0; i<Count; i++) delete Items[i]; SAFE_FREE((void**)&Items); }; }
+ ~gAckList() { if (Count) { for (int i=0; i<Count; i++) delete Items[i]; mir_free(Items); }; }
};
extern HANDLE ghSendWindowList;
|