diff options
author | George Hazan <george.hazan@gmail.com> | 2016-07-26 09:20:25 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-07-26 09:20:25 +0000 |
commit | 6e53dfca72b932c4bdcd7aa02ca62bf8b2630eac (patch) | |
tree | 2e8bb660c908b54914abd562af8aafa4a486c846 /plugins/BasicHistory/src/Searcher.cpp | |
parent | a61c8728b379057fe7f0a0d86fe0b037598229dd (diff) |
less TCHARs:
- TCHAR is replaced with wchar_t everywhere;
- LPGENT replaced with either LPGENW or LPGEN;
- fixes for ANSI plugins that improperly used _t functions;
- TCHAR *t removed from MAllStrings;
- ptszGroup, ptszTitle & ptszTab in OPTIONSDIALOGPAGE replaced with pwsz*
git-svn-id: http://svn.miranda-ng.org/main/trunk@17133 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/BasicHistory/src/Searcher.cpp')
-rw-r--r-- | plugins/BasicHistory/src/Searcher.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/plugins/BasicHistory/src/Searcher.cpp b/plugins/BasicHistory/src/Searcher.cpp index bac7c8f37c..a3c8b4f093 100644 --- a/plugins/BasicHistory/src/Searcher.cpp +++ b/plugins/BasicHistory/src/Searcher.cpp @@ -61,12 +61,12 @@ void Searcher::ClearFind() }
}
-inline TCHAR mytoupper(TCHAR a, std::locale* loc)
+inline wchar_t mytoupper(wchar_t a, std::locale* loc)
{
- return std::toupper<TCHAR>(a, *loc);
+ return std::toupper<wchar_t>(a, *loc);
}
-bool Searcher::CompareStr(std::wstring str, TCHAR *strFind)
+bool Searcher::CompareStr(std::wstring str, wchar_t *strFind)
{
std::locale loc;
if (!matchCase)
@@ -89,7 +89,7 @@ bool Searcher::CompareStr(std::wstring str, TCHAR *strFind) void Searcher::Find()
{
FINDTEXTEX ft;
- TCHAR str[128];
+ wchar_t str[128];
int curSel = 0;
bool isStart = false;
bool finished = false;
@@ -104,7 +104,7 @@ void Searcher::Find() GetWindowText(context->findWindow, str, _countof(str));
if (!str[0]) {
- TCHAR buf[256];
+ wchar_t buf[256];
mir_sntprintf(buf, TranslateT("\"%s\" not found"), str);
MessageBox(context->m_hWnd, buf, TranslateT("Search"), MB_OK | MB_ICONINFORMATION);
return;
@@ -297,20 +297,20 @@ void Searcher::Find() SendMessage(context->editWindow,EM_SETOPTIONS,ECOOP_AND,~ECO_NOHIDESEL);
lastFindSelection = -1;
if (isStart) {
- TCHAR buf[256];
+ wchar_t buf[256];
GetWindowText(context->findWindow, str, _countof(str));
mir_sntprintf(buf, TranslateT("\"%s\" not found"), str);
MessageBox(context->m_hWnd, buf, TranslateT("Search"), MB_OK | MB_ICONINFORMATION);
}
- else MessageBox(context->m_hWnd, TranslateTS(onlyGroup ? LPGENT("You have reached the end of the group.") : LPGENT("You have reached the end of the history.")), TranslateT("Search"), MB_OK | MB_ICONINFORMATION);
+ else MessageBox(context->m_hWnd, TranslateTS(onlyGroup ? LPGENW("You have reached the end of the group.") : LPGENW("You have reached the end of the history.")), TranslateT("Search"), MB_OK | MB_ICONINFORMATION);
}
-bool Searcher::IsInSel(int sel, TCHAR *strFind)
+bool Searcher::IsInSel(int sel, wchar_t *strFind)
{
if (sel < 0 || sel >= (int)context->m_eventList.size())
return false;
- TCHAR str[MAXSELECTSTR + 8]; // for safety reason
+ wchar_t str[MAXSELECTSTR + 8]; // for safety reason
HistoryEventList::EventData data;
for (std::deque<HistoryEventList::EventIndex>::iterator it = context->m_eventList[sel].begin(); it != context->m_eventList[sel].end(); ++it) {
HistoryEventList::EventIndex hDbEvent = *it;
@@ -328,7 +328,7 @@ bool Searcher::IsInSel(int sel, TCHAR *strFind) return false;
}
-bool Searcher::Compare(const bool isMe, const std::wstring& message, TCHAR *strFind)
+bool Searcher::Compare(const bool isMe, const std::wstring& message, wchar_t *strFind)
{
if (onlyIn && isMe || onlyOut && !isMe)
return false;
|