diff options
author | George Hazan <george.hazan@gmail.com> | 2015-04-30 18:47:28 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-04-30 18:47:28 +0000 |
commit | 15d4346a1e3ada4bd14739b63fc239109dc96a0c (patch) | |
tree | 3b5b4a8ce280bfde515f5cffee70ba3f8ebcb778 /plugins/Boltun/src/Engine/TalkEngine.cpp | |
parent | 0ed074b1b6d10f263f33ffd771ad0ffa5ac70011 (diff) |
custom critical section class replaced with mir_cs/mir_cslock
git-svn-id: http://svn.miranda-ng.org/main/trunk@13300 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Boltun/src/Engine/TalkEngine.cpp')
-rw-r--r-- | plugins/Boltun/src/Engine/TalkEngine.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/plugins/Boltun/src/Engine/TalkEngine.cpp b/plugins/Boltun/src/Engine/TalkEngine.cpp index 0391c11112..8d4efbf476 100644 --- a/plugins/Boltun/src/Engine/TalkEngine.cpp +++ b/plugins/Boltun/src/Engine/TalkEngine.cpp @@ -97,8 +97,7 @@ tstring TalkBot::ReplaceAliases(const tstring &message) const TCHAR dividers[] = _T(" \t\n\r,./?\\|;:'\"~!#^&*()_-+=[{]}—\1");
tstring sentence = message;
tstring result;
- int len = (int)sentence.length();
- map<int, tstring> sm;
+ map<size_t, tstring> sm;
//Find smiles
for (size_t i = 0; i < sentence.length() - 1; i++)
{
@@ -116,7 +115,7 @@ tstring TalkBot::ReplaceAliases(const tstring &message) }
}
}
- len = (int)sentence.length();
+ int len = (int)sentence.length();
bool hadQuestionSigns = false;
int it = 0;
while (it != len)
@@ -125,7 +124,7 @@ tstring TalkBot::ReplaceAliases(const tstring &message) {
if (sentence[it] == _T('?'))
hadQuestionSigns = true;
- map<int, tstring>::iterator smit;
+ map<size_t, tstring>::iterator smit;
if (sentence[it] == '\1')
{
smit = sm.find(it);
@@ -515,7 +514,7 @@ void TalkBot::SplitAndSortWords(tstring sentence, vector<tstring>& keywords, const TCHAR dividers[] = _T(" \t\n\r,./?\\|;:'\"~!#^&*()_-+=[{]}—");
int len = (int)sentence.length();
vector<tstring> words;
- map<int, tstring> sm;
+ map<size_t, tstring> sm;
//Find smiles
for (size_t i = 0; i < sentence.length() - 1; i++)
{
@@ -543,7 +542,7 @@ void TalkBot::SplitAndSortWords(tstring sentence, vector<tstring>& keywords, {
if (sentence[it] == _T('?'))
hadQuestionSigns = true;
- map<int, tstring>::iterator smit;
+ map<size_t, tstring>::iterator smit;
if (_istspace(sentence[it]) && (smit = sm.find(it)) != sm.end())
words.push_back((*smit).second);
it++;
|