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/MirandaG15 | |
parent | fd7566b5de6b59bb18ff380cb1fa3f3f1089b70b (diff) |
useless field DBEVENTINFO::cbSize removed
Diffstat (limited to 'plugins/MirandaG15')
-rw-r--r-- | plugins/MirandaG15/src/CAppletManager.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/plugins/MirandaG15/src/CAppletManager.cpp b/plugins/MirandaG15/src/CAppletManager.cpp index b6755f5dca..bc1bf2957f 100644 --- a/plugins/MirandaG15/src/CAppletManager.cpp +++ b/plugins/MirandaG15/src/CAppletManager.cpp @@ -662,8 +662,7 @@ void CAppletManager::FinishMessageJob(SMessageJob *pJob) // Only add the message to the history if the contact isn't an irc chatroom if (!(pIRCCon && db_get_b(pJob->hContact, szProto, "ChatRoom", 0) != 0)) { // Add the message to the database - DBEVENTINFO dbei = { 0 }; - dbei.cbSize = sizeof(dbei); + DBEVENTINFO dbei = {}; dbei.eventType = EVENTTYPE_MESSAGE; dbei.flags = DBEF_SENT | DBEF_UTF; dbei.szModule = szProto; @@ -817,15 +816,11 @@ void CAppletManager::MarkMessageAsRead(MCONTACT hContact, MEVENT hEvent) bool CAppletManager::TranslateDBEvent(CEvent *pEvent, WPARAM hContact, LPARAM hdbevent) { // Create struct for dbevent - DBEVENTINFO dbevent; - memset(&dbevent, 0, sizeof(dbevent)); - //dbevent.flags |= PREF_UNICODE; - dbevent.cbSize = sizeof(dbevent); + DBEVENTINFO dbevent = {}; dbevent.cbBlob = db_event_getBlobSize(hdbevent); if (dbevent.cbBlob == -1) // hdbevent is invalid - { return false; - } + dbevent.pBlob = (PBYTE)malloc(dbevent.cbBlob); if (db_event_get(hdbevent, &dbevent) != 0) { free(dbevent.pBlob); |