diff options
Diffstat (limited to 'plugins/Boltun')
-rw-r--r-- | plugins/Boltun/Boltun2.gif | bin | 13171 -> 0 bytes | |||
-rw-r--r-- | plugins/Boltun/Boltun_10.sln | 8 | ||||
-rw-r--r-- | plugins/Boltun/Engine/Mind.cpp | 10 | ||||
-rw-r--r-- | plugins/Boltun/Engine/MyCodeCvt.cpp | 2 | ||||
-rw-r--r-- | plugins/Boltun/Engine/TalkEngine.cpp | 18 | ||||
-rw-r--r-- | plugins/Boltun/Engine/UnrecentChooser.cpp | 2 | ||||
-rw-r--r-- | plugins/Boltun/Engine/ValueChooser.h | 2 | ||||
-rw-r--r-- | plugins/Boltun/Engine/WordsList.cpp | 2 | ||||
-rw-r--r-- | plugins/Boltun/actionQueue.cpp | 4 | ||||
-rw-r--r-- | plugins/Boltun/boltun.cpp | 10 |
10 files changed, 32 insertions, 26 deletions
diff --git a/plugins/Boltun/Boltun2.gif b/plugins/Boltun/Boltun2.gif Binary files differdeleted file mode 100644 index fc2b4a93df..0000000000 --- a/plugins/Boltun/Boltun2.gif +++ /dev/null diff --git a/plugins/Boltun/Boltun_10.sln b/plugins/Boltun/Boltun_10.sln index 1bfc51a895..428d555745 100644 --- a/plugins/Boltun/Boltun_10.sln +++ b/plugins/Boltun/Boltun_10.sln @@ -1,18 +1,24 @@ 
Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boltun", "Boltun_10.vcxproj", "{98DF7761-41D7-4C5C-9FFE-E5CCB3997783}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Boltun", "Boltun_10.vcxproj", "{98DF7761-41D7-4C5C-9FFE-E5CCB3997783}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
+ Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
+ Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{98DF7761-41D7-4C5C-9FFE-E5CCB3997783}.Debug|Win32.ActiveCfg = Debug|Win32
{98DF7761-41D7-4C5C-9FFE-E5CCB3997783}.Debug|Win32.Build.0 = Debug|Win32
+ {98DF7761-41D7-4C5C-9FFE-E5CCB3997783}.Debug|x64.ActiveCfg = Debug|x64
+ {98DF7761-41D7-4C5C-9FFE-E5CCB3997783}.Debug|x64.Build.0 = Debug|x64
{98DF7761-41D7-4C5C-9FFE-E5CCB3997783}.Release|Win32.ActiveCfg = Release|Win32
{98DF7761-41D7-4C5C-9FFE-E5CCB3997783}.Release|Win32.Build.0 = Release|Win32
+ {98DF7761-41D7-4C5C-9FFE-E5CCB3997783}.Release|x64.ActiveCfg = Release|x64
+ {98DF7761-41D7-4C5C-9FFE-E5CCB3997783}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/plugins/Boltun/Engine/Mind.cpp b/plugins/Boltun/Engine/Mind.cpp index 6260177095..667e1faf1a 100644 --- a/plugins/Boltun/Engine/Mind.cpp +++ b/plugins/Boltun/Engine/Mind.cpp @@ -70,7 +70,7 @@ Mind& Mind::operator= (const Mind& mind) inline void format(tstring& s)
{
- int pos = s.length() - 1;
+ int pos = (int)s.length() - 1;
if (s[pos] == _T('\r'))
s.resize(pos);
}
@@ -82,7 +82,7 @@ void toLowerStr(TCHAR* ch) vector<tstring> Mind::Parse(tstring s)
{
- int len = s.length() - 1;
+ int len = (int)s.length() - 1;
vector <tstring> res;
while (len != -1 && _istspace(s[len]))
len--;
@@ -268,7 +268,7 @@ void Mind::Load(tstring filename) count -= 1;
toLowerStr(c);
tstring sc(c);
- int count1 = s1.length();
+ int count1 = (int)s1.length();
TCHAR *c = new TCHAR[count1 + 1];
_tcscpy(c, s1.c_str());
CharLower(c);
@@ -419,7 +419,7 @@ void Mind::LoadSmiles(tstring filename) {
getline(file, s);
if (s.length() > l)
- l = s.length();
+ l = (int)s.length();
data->smiles.insert(s);
}
data->maxSmileLen = l;
@@ -438,7 +438,7 @@ void Mind::LoadSmiles(void *smiles, size_t size) lend++;
tstring s(buf, lend - buf);
if ((unsigned)(lend - buf) > l)
- l = s.length();
+ l = (int)s.length();
data->smiles.insert(s);
if (lend == end)
break;
diff --git a/plugins/Boltun/Engine/MyCodeCvt.cpp b/plugins/Boltun/Engine/MyCodeCvt.cpp index 71e056291a..49722e6f7b 100644 --- a/plugins/Boltun/Engine/MyCodeCvt.cpp +++ b/plugins/Boltun/Engine/MyCodeCvt.cpp @@ -64,7 +64,7 @@ int MyCodeCvt::do_length(const _St& _State, const _To* _F1, #endif
{
- return (_N2 < (size_t)(_L1 - _F1)) ? _N2 : _L1 - _F1;
+ return (_N2 < (size_t)(_L1 - _F1)) ? (int)_N2 : (int)(_L1 - _F1);
}
bool MyCodeCvt::do_always_noconv() const _THROW0()
diff --git a/plugins/Boltun/Engine/TalkEngine.cpp b/plugins/Boltun/Engine/TalkEngine.cpp index a9625dffd2..378f8be102 100644 --- a/plugins/Boltun/Engine/TalkEngine.cpp +++ b/plugins/Boltun/Engine/TalkEngine.cpp @@ -99,13 +99,13 @@ tstring TalkBot::ReplaceAliases(const tstring &message) const TCHAR dividers[] = _T(" \t\n\r,./?\\|;:'\"~!#^&*()_-+=[{]}—\1");
tstring sentence = message;
tstring result;
- int len = sentence.length();
+ int len = (int)sentence.length();
vector<tstring> words;
map<int, tstring> sm;
//Find smiles
for (size_t i = 0; i < sentence.length() - 1; i++)
{
- unsigned max = sentence.length() - i;
+ unsigned max = (int)(sentence.length() - i);
if (max > mind.GetData()->maxSmileLen)
max = mind.GetData()->maxSmileLen;
for (unsigned j = max; j > 0; j--)
@@ -120,7 +120,7 @@ tstring TalkBot::ReplaceAliases(const tstring &message) }
}
}
- len = sentence.length();
+ len = (int)sentence.length();
bool hadQuestionSigns = false;
int it = 0;
while (it != len)
@@ -359,7 +359,7 @@ TalkBot::MessageInfo* TalkBot::Reply(void* contact, tstring incomingMessage, boo bool TalkBot::FindExact(ContactData* contactData, const tstring &incomingMessage,
const multimap<tstring, tstring>& map, tstring& res)
{
- int max = map.count(incomingMessage);
+ int max = (int)map.count(incomingMessage);
if (!max)
{
TCHAR c = incomingMessage[incomingMessage.length() - 1];
@@ -404,7 +404,7 @@ void TalkBot::SplitSectences(const tstring &incomingMessage, vector<tstring>& ve {
//FIXME: (THINK ABOUT IT:-) )these chars not always mark the end of sentence.
const TCHAR symbols[] = _T(".?!");
- int it = 0, len = incomingMessage.length();
+ int it = 0, len = (int)incomingMessage.length();
while (it != len)
{
while (it != len && _istspace(incomingMessage[it]))
@@ -455,7 +455,7 @@ tstring TalkBot::ChooseResult(ContactData* contactData, Level maxValue, const mu if (maxValue == NOTHING)
return _T("");
Level target = maxValue;
- int num = mm.count(target);
+ int num = (int)mm.count(target);
/* if (!num)
{
target = maxValue;
@@ -523,13 +523,13 @@ void TalkBot::SplitAndSortWords(tstring sentence, vector<tstring>& keywords, vector<tstring>& otherwords, bool& isQuestion)
{
const TCHAR dividers[] = _T(" \t\n\r,./?\\|;:'\"~!#^&*()_-+=[{]}—");
- int len = sentence.length();
+ int len = (int)sentence.length();
vector<tstring> words;
map<int, tstring> sm;
//Find smiles
for (size_t i = 0; i < sentence.length() - 1; i++)
{
- unsigned max = sentence.length() - i;
+ unsigned max = (int)(sentence.length() - i);
if (max > mind.GetData()->maxSmileLen)
max = mind.GetData()->maxSmileLen;
for (unsigned j = max; j > 0; j--)
@@ -544,7 +544,7 @@ void TalkBot::SplitAndSortWords(tstring sentence, vector<tstring>& keywords, }
}
}
- len = sentence.length();
+ len = (int)sentence.length();
bool hadQuestionSigns = false;
int it = 0;
while (it != len)
diff --git a/plugins/Boltun/Engine/UnrecentChooser.cpp b/plugins/Boltun/Engine/UnrecentChooser.cpp index 069d84f377..b2e5303f5a 100644 --- a/plugins/Boltun/Engine/UnrecentChooser.cpp +++ b/plugins/Boltun/Engine/UnrecentChooser.cpp @@ -31,7 +31,7 @@ void UnRecentChooser::AddChoice(tstring value, float prio) {
if (items.count(value) != 0)
{
- int val = items[value];
+ int val = (int)items[value];
oldItems.insert(make_pair(val, value));
oldPrios.insert(make_pair(value, prio));
if (min > val || min == -1)
diff --git a/plugins/Boltun/Engine/ValueChooser.h b/plugins/Boltun/Engine/ValueChooser.h index 3fb1510609..219a55a8f2 100644 --- a/plugins/Boltun/Engine/ValueChooser.h +++ b/plugins/Boltun/Engine/ValueChooser.h @@ -57,7 +57,7 @@ public: {
for (size_t i = 0; i < data.size(); i++)
numbers[i] = false;
- freeNumbers = data.size();
+ freeNumbers = (int)data.size();
}
typename container::value_type GetString()
diff --git a/plugins/Boltun/Engine/WordsList.cpp b/plugins/Boltun/Engine/WordsList.cpp index 5e5d0c37a5..3209bf2db6 100644 --- a/plugins/Boltun/Engine/WordsList.cpp +++ b/plugins/Boltun/Engine/WordsList.cpp @@ -63,7 +63,7 @@ void WordsList::Parse(tstring s/*, bool allowUnstrict*/) }
else
unstrict = false;*/
- int len = s.length() - 1;
+ int len = (int)s.length() - 1;
while (len != -1 && _istspace(s[len]))
len--;
if (len < 0)
diff --git a/plugins/Boltun/actionQueue.cpp b/plugins/Boltun/actionQueue.cpp index 7b86af5a91..b627d8abc4 100644 --- a/plugins/Boltun/actionQueue.cpp +++ b/plugins/Boltun/actionQueue.cpp @@ -111,7 +111,7 @@ static char *MsgServiceName(HANDLE hContact) static void TimerAnswer(HANDLE hContact, const TalkBot::MessageInfo* info)
{
DBEVENTINFO ldbei;
- int size = info->Answer.length() + 1;
+ int size = (int)info->Answer.length() + 1;
int bufsize = size;
char* msg;
#ifdef UNICODE
@@ -166,7 +166,7 @@ void DoAnswer(HANDLE hContact, const TalkBot::MessageInfo *info, bool sticky = f int waitTime, thinkTime = 0;
int defWaitTime = Config.AnswerPauseTime * 1000;
if (Config.PauseDepends)
- waitTime = defWaitTime * info->Answer.length() / 25;
+ waitTime = defWaitTime * (int)info->Answer.length() / 25;
else
waitTime = defWaitTime;
if (Config.PauseRandom)
diff --git a/plugins/Boltun/boltun.cpp b/plugins/Boltun/boltun.cpp index 372995be7c..b63b082329 100644 --- a/plugins/Boltun/boltun.cpp +++ b/plugins/Boltun/boltun.cpp @@ -300,7 +300,7 @@ void UpdateEverybodyCheckboxes(HWND hwndDlg) EnableWindow(wnd, Enable);
}
-static int CALLBACK MainDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
+static INT_PTR CALLBACK MainDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
BOOL bTranslated = FALSE;
static bool loading = true;
@@ -389,7 +389,7 @@ void UpdateUnderstandAlwaysCheckbox(HWND hwndDlg) EnableWindow(wnd, Enable);
}
-static int CALLBACK EngineDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
+static INT_PTR CALLBACK EngineDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
WORD param;
BOOL bTranslated = FALSE;
@@ -572,17 +572,17 @@ static int ContactClick(WPARAM wParam, LPARAM lParam, BOOL clickNotToChat) return 0;
}
-static int ContactClickAutoChat(WPARAM wParam, LPARAM lParam)
+static INT_PTR ContactClickAutoChat(WPARAM wParam, LPARAM lParam)
{
return ContactClick(wParam, lParam, 0);
}
-static int ContactClickNotToChat(WPARAM wParam, LPARAM lParam)
+static INT_PTR ContactClickNotToChat(WPARAM wParam, LPARAM lParam)
{
return ContactClick(wParam, lParam, 1);
}
-static int ContactClickStartChatting(WPARAM wParam, LPARAM lParam)
+static INT_PTR ContactClickStartChatting(WPARAM wParam, LPARAM lParam)
{
HANDLE hContact = (HANDLE)wParam;
StartChatting(hContact);
|