From 0db449bf70966941453cfbb8ec05fd430a96dc12 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 24 Jul 2019 13:20:12 +0300 Subject: useless member NETLIBOPENCONNECTION::cbSize removed --- plugins/Ping/src/collection.h | 19 ++++++++----------- plugins/Ping/src/utils.cpp | 13 ++----------- 2 files changed, 10 insertions(+), 22 deletions(-) (limited to 'plugins/Ping/src') diff --git a/plugins/Ping/src/collection.h b/plugins/Ping/src/collection.h index e19c5874d4..df6fff15c2 100644 --- a/plugins/Ping/src/collection.h +++ b/plugins/Ping/src/collection.h @@ -155,19 +155,16 @@ public: virtual const bool pop(T &val) { - if (!head) return false; + if (!head) + return false; ListNode *n = head; - if (head) { - head = head->next; - if (n == tail) tail = nullptr; - val = n->val; - delete n; - Collection::count--; - return true; - } - else - return false; + head = head->next; + if (n == tail) tail = nullptr; + val = n->val; + delete n; + Collection::count--; + return true; } }; diff --git a/plugins/Ping/src/utils.cpp b/plugins/Ping/src/utils.cpp index de7a1d0bf9..43c777f315 100644 --- a/plugins/Ping/src/utils.cpp +++ b/plugins/Ping/src/utils.cpp @@ -16,15 +16,7 @@ LRESULT CALLBACK NullWindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM l return DefWindowProc(hWnd, message, wParam, lParam); } -static INT_PTR CALLBACK sttMainThreadCallback(void *dwParam) -{ - POPUPDATAW* ppd = (POPUPDATAW*)dwParam; - PUAddPopupW(ppd); - free(ppd); - return 0; -} - -void __stdcall ShowPopup(wchar_t *line1, wchar_t *line2, int flags) +void __stdcall ShowPopup(wchar_t *line1, wchar_t *line2, int) { if (Miranda_IsTerminated()) return; @@ -63,8 +55,7 @@ INT_PTR PluginPing(WPARAM, LPARAM lParam) clock_t start_tcp = clock(); //GetLocalTime(&systime); - NETLIBOPENCONNECTION conn = { 0 }; - conn.cbSize = sizeof(NETLIBOPENCONNECTION); + NETLIBOPENCONNECTION conn = {}; conn.szHost = mir_u2a(pa->pszName); conn.wPort = pa->port; conn.timeout = options.ping_timeout; -- cgit v1.2.3