summaryrefslogtreecommitdiff
path: root/src/mir_app
diff options
context:
space:
mode:
Diffstat (limited to 'src/mir_app')
-rw-r--r--src/mir_app/src/chat.h2
-rw-r--r--src/mir_app/src/chat_manager.cpp2
-rw-r--r--src/mir_app/src/chat_tools.cpp11
3 files changed, 1 insertions, 14 deletions
diff --git a/src/mir_app/src/chat.h b/src/mir_app/src/chat.h
index 88f9660f17..3d158e5beb 100644
--- a/src/mir_app/src/chat.h
+++ b/src/mir_app/src/chat.h
@@ -126,6 +126,4 @@ CSrmmLogWindow *Srmm_GetLogWindow(CMsgDialog *pDlg);
void Chat_RemoveContact(MCONTACT hContact);
-const wchar_t* my_strstri(const wchar_t* s1, const wchar_t* s2);
-
#pragma comment(lib,"comctl32.lib")
diff --git a/src/mir_app/src/chat_manager.cpp b/src/mir_app/src/chat_manager.cpp
index ce6af63eee..8daeeaadf0 100644
--- a/src/mir_app/src/chat_manager.cpp
+++ b/src/mir_app/src/chat_manager.cpp
@@ -827,7 +827,7 @@ static wchar_t* UM_FindUserAutoComplete(SESSION_INFO *si, const wchar_t* pszOrig
wchar_t *pszName = nullptr;
for (auto &ui : si->getUserList())
- if (ui->pszNick && my_strstri(ui->pszNick, pszOriginal) == ui->pszNick)
+ if (ui->pszNick && mir_wstrstri(ui->pszNick, pszOriginal) == ui->pszNick)
if (mir_wstrcmpi(ui->pszNick, pszCurrent) > 0 && (!pszName || mir_wstrcmpi(ui->pszNick, pszName) < 0))
pszName = ui->pszNick;
diff --git a/src/mir_app/src/chat_tools.cpp b/src/mir_app/src/chat_tools.cpp
index 980fcd2ea8..f334a128b5 100644
--- a/src/mir_app/src/chat_tools.cpp
+++ b/src/mir_app/src/chat_tools.cpp
@@ -416,17 +416,6 @@ BOOL DoSoundsFlashPopupTrayStuff(SESSION_INFO *si, GCEVENT *gce, BOOL bHighlight
return TRUE;
}
-const wchar_t* my_strstri(const wchar_t *s1, const wchar_t *s2)
-{
- int i, j, k;
- for (i = 0; s1[i]; i++)
- for (j = i, k = 0; towlower(s1[j]) == towlower(s2[k]); j++, k++)
- if (!s2[k + 1])
- return s1 + i;
-
- return nullptr;
-}
-
static wchar_t szTrimString[] = L":,.!?;\'>)";
bool IsHighlighted(SESSION_INFO *si, GCEVENT *gce)