diff options
Diffstat (limited to 'plugins/Scriver')
-rw-r--r-- | plugins/Scriver/src/globals.cpp | 2 | ||||
-rw-r--r-- | plugins/Scriver/src/msgdialog.cpp | 12 | ||||
-rw-r--r-- | plugins/Scriver/src/msglog.cpp | 2 | ||||
-rw-r--r-- | plugins/Scriver/src/msgs.cpp | 4 |
4 files changed, 10 insertions, 10 deletions
diff --git a/plugins/Scriver/src/globals.cpp b/plugins/Scriver/src/globals.cpp index 8c2f469b17..52f0525a3f 100644 --- a/plugins/Scriver/src/globals.cpp +++ b/plugins/Scriver/src/globals.cpp @@ -143,7 +143,7 @@ static int ackevent(WPARAM, LPARAM lParam) hContact = (db_mc_isMeta(hContact)) ? db_mc_getSrmmSub(item->hContact) : item->hContact;
- DBEVENTINFO dbei = { sizeof(dbei) };
+ DBEVENTINFO dbei = {};
dbei.eventType = EVENTTYPE_MESSAGE;
dbei.flags = DBEF_UTF | DBEF_SENT | ((item->flags & PREF_RTL) ? DBEF_RTL : 0);
dbei.szModule = GetContactProto(hContact);
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp index ba32b638a2..08012ac957 100644 --- a/plugins/Scriver/src/msgdialog.cpp +++ b/plugins/Scriver/src/msgdialog.cpp @@ -798,13 +798,13 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP // This finds the first message to display, it works like shit
dat->hDbEventFirst = db_event_firstUnread(dat->hContact);
if (dat->hDbEventFirst != NULL) {
- DBEVENTINFO dbei = { sizeof(dbei) };
+ DBEVENTINFO dbei = {};
db_event_get(dat->hDbEventFirst, &dbei);
if (DbEventIsMessageOrCustom(&dbei) && !(dbei.flags & DBEF_READ) && !(dbei.flags & DBEF_SENT))
notifyUnread = true;
}
- DBEVENTINFO dbei = { sizeof(dbei) };
+ DBEVENTINFO dbei = {};
MEVENT hPrevEvent;
switch (historyMode) {
case LOADHISTORY_COUNT:
@@ -851,7 +851,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP {
MEVENT hdbEvent = db_event_last(dat->hContact);
if (hdbEvent) {
- DBEVENTINFO dbei = { sizeof(dbei) };
+ DBEVENTINFO dbei = {};
do {
db_event_get(hdbEvent, &dbei);
if (dbei.eventType == EVENTTYPE_MESSAGE && !(dbei.flags & DBEF_SENT)) {
@@ -1138,7 +1138,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP MEVENT hDbEvent = dat->hDbUnreadEventFirst;
dat->hDbUnreadEventFirst = NULL;
while (hDbEvent != NULL) {
- DBEVENTINFO dbei = { sizeof(dbei) };
+ DBEVENTINFO dbei = {};
db_event_get(hDbEvent, &dbei);
if (!(dbei.flags & DBEF_SENT) && (DbEventIsMessageOrCustom(&dbei) || dbei.eventType == EVENTTYPE_URL))
pcli->pfnRemoveEvent(dat->hContact, hDbEvent);
@@ -1257,7 +1257,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP case HM_DBEVENTADDED:
if (wParam == dat->hContact) {
MEVENT hDbEvent = lParam;
- DBEVENTINFO dbei = { sizeof(dbei) };
+ DBEVENTINFO dbei = {};
db_event_get(hDbEvent, &dbei);
if (dat->hDbEventFirst == NULL)
dat->hDbEventFirst = hDbEvent;
@@ -1618,7 +1618,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP mir_free(buffer);
}
else {
- DBEVENTINFO dbei = { sizeof(dbei) };
+ DBEVENTINFO dbei = {};
dbei.cbBlob = db_event_getBlobSize(dat->hDbEventLast);
if (dbei.cbBlob == 0xFFFFFFFF)
break;
diff --git a/plugins/Scriver/src/msglog.cpp b/plugins/Scriver/src/msglog.cpp index be1a850a03..b0b5e673cd 100644 --- a/plugins/Scriver/src/msglog.cpp +++ b/plugins/Scriver/src/msglog.cpp @@ -114,7 +114,7 @@ int DbEventIsShown(DBEVENTINFO &dbei) EventData* getEventFromDB(SrmmWindowData *dat, MCONTACT hContact, MEVENT hDbEvent)
{
- DBEVENTINFO dbei = { sizeof(dbei) };
+ DBEVENTINFO dbei = {};
dbei.cbBlob = db_event_getBlobSize(hDbEvent);
if (dbei.cbBlob == -1)
return NULL;
diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp index 2857737506..aed59ba130 100644 --- a/plugins/Scriver/src/msgs.cpp +++ b/plugins/Scriver/src/msgs.cpp @@ -91,7 +91,7 @@ static INT_PTR ReadMessageCommand(WPARAM, LPARAM lParam) static int MessageEventAdded(WPARAM hContact, LPARAM lParam)
{
MEVENT hDbEvent = (MEVENT)lParam;
- DBEVENTINFO dbei = { sizeof(dbei) };
+ DBEVENTINFO dbei = {};
db_event_get(hDbEvent, &dbei);
if (dbei.eventType == EVENTTYPE_MESSAGE && (dbei.flags & DBEF_READ))
return 0;
@@ -249,7 +249,7 @@ static void RestoreUnreadMessageAlerts(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 = {};
dbei.cbBlob = 0;
db_event_get(hDbEvent, &dbei);
if ((dbei.flags & (DBEF_SENT | DBEF_READ)) || !DbEventIsMessageOrCustom(&dbei))
|