From 1c0172cca4f1e90679321912e20436a7f42f122d Mon Sep 17 00:00:00 2001 From: Goraf <22941576+Goraf@users.noreply.github.com> Date: Sat, 24 Feb 2018 15:32:06 +0100 Subject: more nullptr --- plugins/ContactsPlus/src/receive.h | 2 +- plugins/ContactsPlus/src/send.h | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'plugins/ContactsPlus') 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; ihProcc==hProcc) { return Items[i]->ackData; }; return NULL; }; + TAckData* Get(HANDLE hProcc) { for (int i=0; ihProcc==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; ihProcc==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; ihProcc==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