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/Variables/src/parse_miranda.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'plugins/Variables') diff --git a/plugins/Variables/src/parse_miranda.cpp b/plugins/Variables/src/parse_miranda.cpp index 72cf34604e..8996cbbc46 100644 --- a/plugins/Variables/src/parse_miranda.cpp +++ b/plugins/Variables/src/parse_miranda.cpp @@ -564,12 +564,8 @@ static wchar_t* parseDbEvent(ARGUMENTSINFO *ai) if (hDbEvent == NULL) return nullptr; - DB::EventInfo dbe; - dbe.cbBlob = -1; - if (db_event_get(hDbEvent, &dbe)) - return nullptr; - - return DbEvent_GetTextW(&dbe, CP_ACP); + DB::EventInfo dbe(hDbEvent); + return (dbe) ? DbEvent_GetTextW(&dbe, CP_ACP) : nullptr; } static wchar_t* parseTranslate(ARGUMENTSINFO *ai) -- cgit v1.2.3