diff options
author | George Hazan <ghazan@miranda.im> | 2019-07-24 13:20:12 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-07-24 13:20:12 +0300 |
commit | 0db449bf70966941453cfbb8ec05fd430a96dc12 (patch) | |
tree | e01421e30b58ae2799929e16a6a326f5d4f68a5d /plugins/Ping/src | |
parent | 30dad0388a14244ef9b06afc113085f6a49bcbb8 (diff) |
useless member NETLIBOPENCONNECTION::cbSize removed
Diffstat (limited to 'plugins/Ping/src')
-rw-r--r-- | plugins/Ping/src/collection.h | 19 | ||||
-rw-r--r-- | plugins/Ping/src/utils.cpp | 13 |
2 files changed, 10 insertions, 22 deletions
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<T> *n = head;
- if (head) {
- head = head->next;
- if (n == tail) tail = nullptr;
- val = n->val;
- delete n;
- Collection<T>::count--;
- return true;
- }
- else
- return false;
+ head = head->next;
+ if (n == tail) tail = nullptr;
+ val = n->val;
+ delete n;
+ Collection<T>::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;
|