From 90ac4c689e1322b48f6ca53a0c8fff81daf73c9c Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 10 Apr 2023 18:50:46 +0300 Subject: code cleaning --- plugins/Scriver/src/msgdialog.cpp | 5 ++--- plugins/Scriver/src/msglog.cpp | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'plugins/Scriver/src') 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)) -- cgit v1.2.3