diff options
author | George Hazan <george.hazan@gmail.com> | 2014-12-14 12:50:41 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-12-14 12:50:41 +0000 |
commit | 4239ca3dd9187b3c184b2e4c42ef889b108532d4 (patch) | |
tree | e495594dd67450041322087f63a306fe90aee972 /protocols/MRA | |
parent | 5e85f48b85b54342b8bb472c10c5593abbb8b1eb (diff) |
mir_calloc replaced with new()
git-svn-id: http://svn.miranda-ng.org/main/trunk@11402 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MRA')
-rw-r--r-- | protocols/MRA/src/MraAvatars.cpp | 4 | ||||
-rw-r--r-- | protocols/MRA/src/MraSendQueue.cpp | 6 |
2 files changed, 4 insertions, 6 deletions
diff --git a/protocols/MRA/src/MraAvatars.cpp b/protocols/MRA/src/MraAvatars.cpp index c8d3466d1c..2e757f7a66 100644 --- a/protocols/MRA/src/MraAvatars.cpp +++ b/protocols/MRA/src/MraAvatars.cpp @@ -56,7 +56,7 @@ DWORD CMraProto::MraAvatarsQueueInitialize(HANDLE *phAvatarsQueueHandle) if (phAvatarsQueueHandle == NULL)
return ERROR_INVALID_HANDLE;
- MRA_AVATARS_QUEUE *pmraaqAvatarsQueue = (MRA_AVATARS_QUEUE*)mir_calloc(sizeof(MRA_AVATARS_QUEUE));
+ MRA_AVATARS_QUEUE *pmraaqAvatarsQueue = new MRA_AVATARS_QUEUE();
if (pmraaqAvatarsQueue == NULL)
return GetLastError();
@@ -131,7 +131,7 @@ void CMraProto::MraAvatarsQueueDestroy(HANDLE hAvatarsQueueHandle) ListMTDestroy(pmraaqAvatarsQueue);
Netlib_CloseHandle(pmraaqAvatarsQueue->hNetlibUser);
- mir_free(pmraaqAvatarsQueue);
+ delete pmraaqAvatarsQueue;
}
DWORD CMraProto::MraAvatarsQueueAdd(HANDLE hAvatarsQueueHandle, DWORD dwFlags, MCONTACT hContact, DWORD *pdwAvatarsQueueID)
diff --git a/protocols/MRA/src/MraSendQueue.cpp b/protocols/MRA/src/MraSendQueue.cpp index 4e17b3a4f0..80b9f20b1a 100644 --- a/protocols/MRA/src/MraSendQueue.cpp +++ b/protocols/MRA/src/MraSendQueue.cpp @@ -27,9 +27,7 @@ DWORD MraSendQueueInitialize(DWORD dwSendTimeOutInterval, HANDLE *phSendQueueHan if (!phSendQueueHandle)
return ERROR_INVALID_HANDLE;
- MRA_SEND_QUEUE *pmrasqSendQueue = (MRA_SEND_QUEUE*)mir_calloc(sizeof(MRA_SEND_QUEUE));
- if (!pmrasqSendQueue)
- return GetLastError();
+ MRA_SEND_QUEUE *pmrasqSendQueue = new MRA_SEND_QUEUE();
DWORD dwRetErrorCode = ListMTInitialize(pmrasqSendQueue);
if (dwRetErrorCode == NO_ERROR) {
@@ -55,7 +53,7 @@ void MraSendQueueDestroy(HANDLE hSendQueueHandle) }
ListMTDestroy(pmrasqSendQueue);
- mir_free(pmrasqSendQueue);
+ delete pmrasqSendQueue;
}
|