diff options
author | Goraf <22941576+Goraf@users.noreply.github.com> | 2018-02-24 15:32:06 +0100 |
---|---|---|
committer | Goraf <22941576+Goraf@users.noreply.github.com> | 2018-02-24 18:20:46 +0100 |
commit | 1c0172cca4f1e90679321912e20436a7f42f122d (patch) | |
tree | 77a544d2c09332ec176f42ebcf58a40d9c5d2b93 /plugins/ContactsPlus | |
parent | dff565f40105b20b0e8e4dba1f48ccc9b8e7ff44 (diff) |
more nullptr
Diffstat (limited to 'plugins/ContactsPlus')
-rw-r--r-- | plugins/ContactsPlus/src/receive.h | 2 | ||||
-rw-r--r-- | plugins/ContactsPlus/src/send.h | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/plugins/ContactsPlus/src/receive.h b/plugins/ContactsPlus/src/receive.h index 286f91ca13..967ae7c12b 100644 --- a/plugins/ContactsPlus/src/receive.h +++ b/plugins/ContactsPlus/src/receive.h @@ -38,7 +38,7 @@ struct TReceivedItem { wchar_t* mcaUIN;
wchar_t* mcaNick;
~TReceivedItem() { mir_free(mcaUIN); mir_free(mcaNick); }
- TReceivedItem() { mcaUIN = NULL; mcaNick = NULL; }
+ TReceivedItem() { mcaUIN = nullptr; mcaNick = nullptr; }
};
struct TRecvContactsData
diff --git a/plugins/ContactsPlus/src/send.h b/plugins/ContactsPlus/src/send.h index 1cd9f2ec04..3a63934ec0 100644 --- a/plugins/ContactsPlus/src/send.h +++ b/plugins/ContactsPlus/src/send.h @@ -73,7 +73,7 @@ struct TAckData MCONTACT hContact; // to whom was it sent
MCONTACT* aContacts; // obj
int nContacts; // how many
- TAckData(MCONTACT contact) { hContact = contact; aContacts = NULL; nContacts = 0;};
+ TAckData(MCONTACT contact) { hContact = contact; aContacts = nullptr; nContacts = 0;};
~TAckData() { mir_free(aContacts); }
};
@@ -94,10 +94,10 @@ struct gAckItem { // some shit here 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* Get(HANDLE hProcc) { for (int i=0; i<Count; i++) if (Items[i]->hProcc==hProcc) { return Items[i]->ackData; }; return nullptr; };
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; }
+ 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 nullptr; };
+ gAckList() { Count = 0; Items = nullptr; }
~gAckList() { if (Count) { for (int i=0; i<Count; i++) delete Items[i]; mir_free(Items); }; }
};
|