diff options
author | George Hazan <ghazan@miranda.im> | 2017-01-17 17:19:19 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-01-17 17:19:19 +0300 |
commit | b327ed7872ca83c3a4249039ba1a3d8dd3ece630 (patch) | |
tree | 5a4ae83dafab23f7832186b5dd0736611998f43c /plugins/ContactsPlus | |
parent | fd7566b5de6b59bb18ff380cb1fa3f3f1089b70b (diff) |
useless field DBEVENTINFO::cbSize removed
Diffstat (limited to 'plugins/ContactsPlus')
-rw-r--r-- | plugins/ContactsPlus/src/main.cpp | 4 | ||||
-rw-r--r-- | plugins/ContactsPlus/src/receive.cpp | 4 | ||||
-rw-r--r-- | plugins/ContactsPlus/src/send.cpp | 2 |
3 files changed, 4 insertions, 6 deletions
diff --git a/plugins/ContactsPlus/src/main.cpp b/plugins/ContactsPlus/src/main.cpp index 4ac9334000..e13363c3ff 100644 --- a/plugins/ContactsPlus/src/main.cpp +++ b/plugins/ContactsPlus/src/main.cpp @@ -60,7 +60,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD, LPVOID) static int HookDBEventAdded(WPARAM hContact, LPARAM hDbEvent)
{
//process the event
- DBEVENTINFO dbe = { sizeof(dbe) };
+ DBEVENTINFO dbe = {};
db_event_get(hDbEvent, &dbe);
//check if we should process the event
if (dbe.flags & (DBEF_SENT | DBEF_READ) || dbe.eventType != EVENTTYPE_CONTACTS) return 0;
@@ -92,7 +92,7 @@ static void ProcessUnreadEvents(void) {
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
for (MEVENT hDbEvent = db_event_firstUnread(hContact); hDbEvent; hDbEvent = db_event_next(hContact, hDbEvent)) {
- DBEVENTINFO dbei = { sizeof(dbei) };
+ DBEVENTINFO dbei = {};
db_event_get(hDbEvent, &dbei);
if (!(dbei.flags & (DBEF_SENT | DBEF_READ)) && dbei.eventType == EVENTTYPE_CONTACTS) {
//process the event
diff --git a/plugins/ContactsPlus/src/receive.cpp b/plugins/ContactsPlus/src/receive.cpp index bcf588b6a7..511b4c0972 100644 --- a/plugins/ContactsPlus/src/receive.cpp +++ b/plugins/ContactsPlus/src/receive.cpp @@ -196,9 +196,7 @@ INT_PTR CALLBACK RecvDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara RebuildGroupCombo(hwndDlg);
{ // fill listview with received contacts
- DBEVENTINFO dbe = {0};
-
- dbe.cbSize = sizeof(DBEVENTINFO);
+ DBEVENTINFO dbe = {};
dbe.cbBlob = db_event_getBlobSize(wndData->mhDbEvent);
if (dbe.cbBlob != -1) // this marks an invalid hDbEvent - all smashed anyway...
dbe.pBlob = (PBYTE)_alloca(dbe.cbBlob);
diff --git a/plugins/ContactsPlus/src/send.cpp b/plugins/ContactsPlus/src/send.cpp index 6a9581e02d..cb2318aa17 100644 --- a/plugins/ContactsPlus/src/send.cpp +++ b/plugins/ContactsPlus/src/send.cpp @@ -398,7 +398,7 @@ INT_PTR CALLBACK SendDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara break;
}
- DBEVENTINFO dbei = { sizeof(dbei) };
+ DBEVENTINFO dbei = {};
dbei.szModule = GetContactProto(ackData->hContact);
dbei.eventType = EVENTTYPE_CONTACTS;
dbei.flags = DBEF_SENT | DBEF_UTF;
|