summaryrefslogtreecommitdiff
path: root/src/mir_app
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-11-21 21:39:58 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-11-21 21:39:58 +0300
commit025f4137a8d54ae30ace6291b0cee1ba44288c8e (patch)
tree545630246029ecd7c61fa6320959505415fc06be /src/mir_app
parent286eb23094e65c80209cca5a029557e792010ec9 (diff)
this code is so much faster
Diffstat (limited to 'src/mir_app')
-rw-r--r--src/mir_app/src/chat_manager.cpp8
-rw-r--r--src/mir_app/src/chat_svc.cpp2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/mir_app/src/chat_manager.cpp b/src/mir_app/src/chat_manager.cpp
index 3552cf8e7d..f51d1f2811 100644
--- a/src/mir_app/src/chat_manager.cpp
+++ b/src/mir_app/src/chat_manager.cpp
@@ -689,14 +689,14 @@ bool UM_SortUser(SESSION_INFO *si, const wchar_t *pszUID)
return true;
}
-USERINFO* UM_AddUser(STATUSINFO *pStatusList, SESSION_INFO *si, const wchar_t *pszUID, const wchar_t *pszNick, WORD wStatus)
+USERINFO* UM_AddUser(SESSION_INFO *si, const wchar_t *pszUID, const wchar_t *pszNick, WORD wStatus)
{
- if (pStatusList == nullptr || si == nullptr || pszNick == nullptr)
+ if (si == nullptr || pszNick == nullptr)
return nullptr;
USERINFO *node = new USERINFO();
- replaceStrW(node->pszUID, pszUID);
- replaceStrW(node->pszNick, pszNick);
+ node->pszUID = mir_wstrdup(pszUID);
+ node->pszNick = mir_wstrdup(pszNick);
node->Status = wStatus;
si->getUserList().insert(node);
return node;
diff --git a/src/mir_app/src/chat_svc.cpp b/src/mir_app/src/chat_svc.cpp
index 2eeb134218..daaab3b654 100644
--- a/src/mir_app/src/chat_svc.cpp
+++ b/src/mir_app/src/chat_svc.cpp
@@ -369,7 +369,7 @@ static void AddUser(GCEVENT *gce)
WORD status = TM_StringToWord(si->pStatuses, gce->ptszStatus);
- USERINFO *ui = g_chatApi.UM_AddUser(si->pStatuses, si, gce->ptszUID, gce->ptszNick, status);
+ USERINFO *ui = g_chatApi.UM_AddUser(si, gce->ptszUID, gce->ptszNick, status);
if (ui == nullptr)
return;