diff options
author | George Hazan <george.hazan@gmail.com> | 2023-12-25 14:58:56 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-12-25 14:58:56 +0300 |
commit | 0f9e1002ec21154bc476fbfeab0d21f796515823 (patch) | |
tree | 678f870457343d977afe06b154cfa5323b75e8da /protocols | |
parent | ee7a91629442ba40e876e19e4cdd7af173e8e840 (diff) |
DbEvent_GetTextW: useless second parameter removed
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/Discord/src/dispatch.cpp | 2 | ||||
-rw-r--r-- | protocols/ICQ-WIM/src/menus.cpp | 6 | ||||
-rw-r--r-- | protocols/ICQ-WIM/src/proto.cpp | 2 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_rc.cpp | 4 |
4 files changed, 7 insertions, 7 deletions
diff --git a/protocols/Discord/src/dispatch.cpp b/protocols/Discord/src/dispatch.cpp index 58a66bd90e..2f3686af46 100644 --- a/protocols/Discord/src/dispatch.cpp +++ b/protocols/Discord/src/dispatch.cpp @@ -395,7 +395,7 @@ void CDiscordProto::OnCommandMessage(const JSONNode &pRoot, bool bIsNew) DB::EventInfo dbei;
dbei.cbBlob = -1;
if (!db_event_get(hOldEvent, &dbei)) {
- ptrW wszOldText(DbEvent_GetTextW(&dbei, CP_UTF8));
+ ptrW wszOldText(DbEvent_GetTextW(&dbei));
if (wszOldText)
wszText.Insert(0, wszOldText);
if (dbei.flags & DBEF_SENT)
diff --git a/protocols/ICQ-WIM/src/menus.cpp b/protocols/ICQ-WIM/src/menus.cpp index 5c7fca94ad..69d8191157 100644 --- a/protocols/ICQ-WIM/src/menus.cpp +++ b/protocols/ICQ-WIM/src/menus.cpp @@ -29,7 +29,7 @@ int CIcqProto::OnPrebuildMenu(WPARAM hContact, LPARAM lParam) auto *dbei = (DB::EventInfo *)lParam; Menu_ShowItem(hmiForward, dbei->eventType == EVENTTYPE_MESSAGE || dbei->eventType == EVENTTYPE_FILE); - ptrW wszText(DbEvent_GetTextW(dbei, CP_UTF8)); + ptrW wszText(DbEvent_GetTextW(dbei)); Menu_ShowItem(hmiConvert, fileText2url(wszText.get())); } return 0; @@ -123,7 +123,7 @@ void CIcqProto::ForwardMessage(MEVENT hEvent, MCONTACT to) return; CMStringW wszId(GetUserId(dbei.hContact)); - ptrW wszText(DbEvent_GetTextW(&dbei, CP_UTF8)); + ptrW wszText(DbEvent_GetTextW(&dbei)); JSONNode parts(JSON_ARRAY); JSONNode msgText; msgText << CHAR_PARAM("mediaType", "forward") << WCHAR_PARAM("sn", wszId) << INT_PARAM("time", dbei.timestamp) @@ -155,7 +155,7 @@ INT_PTR CIcqProto::SvcExecMenu(WPARAM iCommand, LPARAM pHandle) return 0; IcqFileInfo *pFileInfo = nullptr; - CMStringW wszText(ptrW(DbEvent_GetTextW(&dbei, CP_UTF8))); + CMStringW wszText(ptrW(DbEvent_GetTextW(&dbei))); if (CheckFile(dbei.hContact, wszText, pFileInfo)) { if (!pFileInfo || pFileInfo->bIsSticker) { // sticker is a simple text message prcoessed by SmileyAdd diff --git a/protocols/ICQ-WIM/src/proto.cpp b/protocols/ICQ-WIM/src/proto.cpp index f5e60e2b13..dea367270c 100644 --- a/protocols/ICQ-WIM/src/proto.cpp +++ b/protocols/ICQ-WIM/src/proto.cpp @@ -590,7 +590,7 @@ int CIcqProto::SendMsg(MCONTACT hContact, MEVENT hReplyEvent, const char *pszSrc CMStringA replyId(GetUserId(dbei.hContact));
replyTo << CHAR_PARAM("mediaType", "quote") << CHAR_PARAM("sn", replyId) << INT_PARAM("time", dbei.timestamp)
<< CHAR_PARAM("msgId", dbei.szId) << WCHAR_PARAM("friendly", Clist_GetContactDisplayName(dbei.hContact, 0))
- << WCHAR_PARAM("text", ptrW(DbEvent_GetTextW(&dbei, CP_UTF8)));
+ << WCHAR_PARAM("text", ptrW(DbEvent_GetTextW(&dbei)));
parts.push_back(replyTo);
}
}
diff --git a/protocols/JabberG/src/jabber_rc.cpp b/protocols/JabberG/src/jabber_rc.cpp index bd49cf6adf..aa924db49b 100644 --- a/protocols/JabberG/src/jabber_rc.cpp +++ b/protocols/JabberG/src/jabber_rc.cpp @@ -451,7 +451,7 @@ int CJabberProto::RcGetUnreadEventsCount() for (MEVENT hDbEvent = db_event_firstUnread(hContact); hDbEvent; hDbEvent = db_event_next(hContact, hDbEvent)) {
DB::EventInfo dbei(hDbEvent);
if (dbei && dbei.eventType == EVENTTYPE_MESSAGE && !(dbei.flags & DBEF_READ) && !(dbei.flags & DBEF_SENT)) {
- ptrW szEventText(DbEvent_GetTextW(&dbei, CP_ACP));
+ ptrW szEventText(DbEvent_GetTextW(&dbei));
if (szEventText)
nEventsSent++;
}
@@ -529,7 +529,7 @@ int CJabberProto::AdhocForwardHandler(const TiXmlElement*, CJabberIqInfo *pInfo, if (dbei.eventType != EVENTTYPE_MESSAGE || (dbei.flags & (DBEF_READ | DBEF_SENT)))
continue;
- ptrW szEventText(DbEvent_GetTextW(&dbei, CP_ACP));
+ ptrW szEventText(DbEvent_GetTextW(&dbei));
if (szEventText == nullptr)
continue;
|