diff options
author | aunsane <aunsane@gmail.com> | 2018-02-24 01:15:27 +0300 |
---|---|---|
committer | aunsane <aunsane@gmail.com> | 2018-02-24 01:15:27 +0300 |
commit | 1785dc55c0a4cdcbc5f9788e0196e7d3a38fe53c (patch) | |
tree | 3c9fb0a2d27504f14e1ef9ffe43e2d58f4ea1085 /plugins/CloudFile/src/utils.cpp | |
parent | 3f343c22a352462660a71806303c1f8957a85702 (diff) |
CloudFile: Implement new upload services (#1144)
Diffstat (limited to 'plugins/CloudFile/src/utils.cpp')
-rw-r--r-- | plugins/CloudFile/src/utils.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/plugins/CloudFile/src/utils.cpp b/plugins/CloudFile/src/utils.cpp index 44a3149a25..24559827ef 100644 --- a/plugins/CloudFile/src/utils.cpp +++ b/plugins/CloudFile/src/utils.cpp @@ -3,12 +3,9 @@ void ShowNotification(const wchar_t *caption, const wchar_t *message, int flags, MCONTACT hContact) { if (Miranda_IsTerminated()) - { return; - } - if (ServiceExists(MS_POPUP_ADDPOPUPT) && db_get_b(NULL, "Popup", "ModuleIsEnabled", 1)) - { + if (ServiceExists(MS_POPUP_ADDPOPUPT) && db_get_b(NULL, "Popup", "ModuleIsEnabled", 1)) { POPUPDATAT ppd = { 0 }; ppd.lchContact = hContact; wcsncpy(ppd.lpwzContactName, caption, MAX_CONTACTNAME); @@ -91,11 +88,9 @@ void PasteToClipboard(const wchar_t *data) HGLOBAL hClipboardData = GlobalAlloc(NULL, size); if (hClipboardData) { wchar_t *pchData = (wchar_t*)GlobalLock(hClipboardData); - if (pchData) { - memcpy(pchData, (wchar_t*)data, size); - GlobalUnlock(hClipboardData); - SetClipboardData(CF_UNICODETEXT, hClipboardData); - } + mir_wstrcpy(pchData, data); + GlobalUnlock(hClipboardData); + SetClipboardData(CF_UNICODETEXT, hClipboardData); } CloseClipboard(); } |