diff options
author | George Hazan <ghazan@miranda.im> | 2023-04-10 18:50:46 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2023-04-10 18:50:46 +0300 |
commit | 90ac4c689e1322b48f6ca53a0c8fff81daf73c9c (patch) | |
tree | 63e000a99864d819650634fe8a7fa8b2be0cd1d2 /plugins/Scriver/src | |
parent | 79ac0acda98f8f7a34bde30b7720a11c04281cb4 (diff) |
code cleaning
Diffstat (limited to 'plugins/Scriver/src')
-rw-r--r-- | plugins/Scriver/src/msgdialog.cpp | 5 | ||||
-rw-r--r-- | plugins/Scriver/src/msglog.cpp | 5 |
2 files changed, 4 insertions, 6 deletions
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp index 4f65a5cd52..4c6c1f9af0 100644 --- a/plugins/Scriver/src/msgdialog.cpp +++ b/plugins/Scriver/src/msgdialog.cpp @@ -430,9 +430,8 @@ void CMsgDialog::onClick_Quote(CCtrlButton*) mir_free(buffer);
}
else {
- DB::EventInfo dbei;
- dbei.cbBlob = -1;
- if (db_event_get(m_hDbEventLast, &dbei))
+ DB::EventInfo dbei(m_hDbEventLast);
+ if (!dbei)
return;
if (DbEventIsMessageOrCustom(&dbei)) {
diff --git a/plugins/Scriver/src/msglog.cpp b/plugins/Scriver/src/msglog.cpp index ea8dbd2747..f191432ba4 100644 --- a/plugins/Scriver/src/msglog.cpp +++ b/plugins/Scriver/src/msglog.cpp @@ -78,9 +78,8 @@ bool DbEventIsShown(const DBEVENTINFO &dbei) EventData* CMsgDialog::GetEventFromDB(MCONTACT hContact, MEVENT hDbEvent)
{
- DB::EventInfo dbei;
- dbei.cbBlob = -1;
- if (db_event_get(hDbEvent, &dbei))
+ DB::EventInfo dbei(hDbEvent);
+ if (!dbei)
return nullptr;
if (!DbEventIsShown(dbei))
|