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/UserInfoEx | |
parent | fd7566b5de6b59bb18ff380cb1fa3f3f1089b70b (diff) |
useless field DBEVENTINFO::cbSize removed
Diffstat (limited to 'plugins/UserInfoEx')
-rw-r--r-- | plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp | 4 | ||||
-rw-r--r-- | plugins/UserInfoEx/src/mir_db.cpp | 4 |
2 files changed, 3 insertions, 5 deletions
diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp b/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp index c3b8f48f8e..de3135c5b4 100644 --- a/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp +++ b/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp @@ -402,7 +402,7 @@ BYTE CExImContactXML::ExportEvents() // read out all events for the current contact
for (MEVENT hDbEvent = db_event_first(_hContact); hDbEvent != NULL; hDbEvent = db_event_next(_hContact, hDbEvent)) {
- DBEVENTINFO dbei = { sizeof(DBEVENTINFO) };
+ DBEVENTINFO dbei = {};
if (DB::Event::GetInfoWithData(hDbEvent, &dbei))
continue;
@@ -939,7 +939,7 @@ int CExImContactXML::ImportEvent(LPCSTR pszModule, TiXmlElement *xmlEvent) return ERROR_NOT_ADDED;
// timestamp must be valid
- DBEVENTINFO dbei = { sizeof(dbei) };
+ DBEVENTINFO dbei = {};
xmlEvent->Attribute("time", (LPINT)&dbei.timestamp);
if (dbei.timestamp == 0)
return ERROR_INVALID_TIMESTAMP;
diff --git a/plugins/UserInfoEx/src/mir_db.cpp b/plugins/UserInfoEx/src/mir_db.cpp index f1b8feaf83..00deddc966 100644 --- a/plugins/UserInfoEx/src/mir_db.cpp +++ b/plugins/UserInfoEx/src/mir_db.cpp @@ -33,7 +33,7 @@ namespace Contact { **/
DWORD WhenAdded(DWORD dwUIN, LPCSTR)
{
- DBEVENTINFO dbei = { sizeof(dbei) };
+ DBEVENTINFO dbei = {};
for (MEVENT edbe = db_event_first(NULL); edbe != NULL; edbe = db_event_next(NULL, edbe)) {
// get eventtype and compare
if (!DB::Event::GetInfo(edbe, &dbei) && dbei.eventType == EVENTTYPE_ADDED) {
@@ -513,7 +513,6 @@ namespace Event { bool GetInfo(MEVENT hEvent, DBEVENTINFO *dbei)
{
- dbei->cbSize = sizeof(DBEVENTINFO);
dbei->cbBlob = 0;
dbei->pBlob = NULL;
return db_event_get(hEvent, dbei) != 0;
@@ -531,7 +530,6 @@ bool GetInfo(MEVENT hEvent, DBEVENTINFO *dbei) bool GetInfoWithData(MEVENT hEvent, DBEVENTINFO *dbei)
{
- dbei->cbSize = sizeof(DBEVENTINFO);
if (!dbei->cbBlob) {
INT_PTR size = db_event_getBlobSize(hEvent);
dbei->cbBlob = (size != -1) ? (DWORD)size : 0;
|