diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2014-08-18 21:17:04 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2014-08-18 21:17:04 +0000 |
commit | 0c4171bbee67301b31c24b08d074313cdf98282f (patch) | |
tree | 2ed0558660956756dcb3929872dff0e572aef0d0 /protocols/Tox | |
parent | a93391bc7442c024d5e795e207b8422883e7bfdf (diff) |
Tox: build fix
git-svn-id: http://svn.miranda-ng.org/main/trunk@10234 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox')
-rw-r--r-- | protocols/Tox/src/tox_events.cpp | 4 | ||||
-rw-r--r-- | protocols/Tox/src/tox_proto.cpp | 4 | ||||
-rw-r--r-- | protocols/Tox/src/tox_proto.h | 4 | ||||
-rw-r--r-- | protocols/Tox/src/tox_utils.cpp | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/protocols/Tox/src/tox_events.cpp b/protocols/Tox/src/tox_events.cpp index cef4bb7cc2..51d2421629 100644 --- a/protocols/Tox/src/tox_events.cpp +++ b/protocols/Tox/src/tox_events.cpp @@ -131,7 +131,7 @@ int CToxProto::OnSettingsChanged(MCONTACT hContact, LPARAM lParam) DBCONTACTWRITESETTING* dbcws = (DBCONTACTWRITESETTING*)lParam;
if (hContact == NULL && !strcmp(dbcws->szModule, m_szModuleName) && !strcmp(dbcws->szSetting, "Nick"))
{
- if (tox_set_name(tox, (uint8_t*)(char*)ptrA(mir_utf8encodeW(dbcws->value.ptszVal)), _tcslen(dbcws->value.ptszVal)))
+ if (tox_set_name(tox, (uint8_t*)(char*)ptrA(mir_utf8encodeW(dbcws->value.ptszVal)), (uint16_t)_tcslen(dbcws->value.ptszVal)))
{
SaveToxData();
}
@@ -205,7 +205,7 @@ void CToxProto::OnStatusMessageChanged(Tox *tox, const int friendnumber, const u void CToxProto::OnUserStatusChanged(Tox *tox, int32_t friendnumber, uint8_t usertatus, void *arg)
{
TOX_USERSTATUS userstatus = (TOX_USERSTATUS)usertatus;
- if (userstatus == TOX_USERSTATUS::TOX_USERSTATUS_NONE)
+ if (userstatus == TOX_USERSTATUS_NONE)
{
return;
}
diff --git a/protocols/Tox/src/tox_proto.cpp b/protocols/Tox/src/tox_proto.cpp index 0326b365a4..ceee2bb544 100644 --- a/protocols/Tox/src/tox_proto.cpp +++ b/protocols/Tox/src/tox_proto.cpp @@ -95,7 +95,7 @@ int __cdecl CToxProto::AuthRequest(MCONTACT hContact, const PROTOCHAR* szMessage ptrA reason(mir_utf8encodeW(szMessage));
- int32_t friendnumber = tox_add_friend(tox, &clientId[0], (uint8_t*)(char*)reason, strlen(reason));
+ int32_t friendnumber = tox_add_friend(tox, &clientId[0], (uint8_t*)(char*)reason, (uint16_t)strlen(reason));
if (friendnumber >= 0)
{
SaveToxData();
@@ -172,7 +172,7 @@ int __cdecl CToxProto::SendMsg(MCONTACT hContact, int flags, const char* msg) uint32_t number = tox_get_friend_number(tox, clientId.data());
- int result = tox_send_message(tox, number, (uint8_t*)msg, strlen(msg));
+ int result = tox_send_message(tox, number, (uint8_t*)msg, (uint16_t)strlen(msg));
if (result == 0)
{
debugLogA("CToxProto::SendMsg: could not to send message");
diff --git a/protocols/Tox/src/tox_proto.h b/protocols/Tox/src/tox_proto.h index 08db44767e..abce39d012 100644 --- a/protocols/Tox/src/tox_proto.h +++ b/protocols/Tox/src/tox_proto.h @@ -98,8 +98,8 @@ private: //events
int __cdecl OnAccountLoaded(WPARAM, LPARAM);
- int __cdecl OnContactDeleted(WPARAM, LPARAM);
- int __cdecl OnSettingsChanged(WPARAM, LPARAM);
+ int __cdecl OnContactDeleted(MCONTACT, LPARAM);
+ int __cdecl OnSettingsChanged(MCONTACT, LPARAM);
int __cdecl OnPreShutdown(WPARAM, LPARAM);
INT_PTR __cdecl OnAccountManagerInit(WPARAM, LPARAM);
diff --git a/protocols/Tox/src/tox_utils.cpp b/protocols/Tox/src/tox_utils.cpp index 018774c910..6745bedb71 100644 --- a/protocols/Tox/src/tox_utils.cpp +++ b/protocols/Tox/src/tox_utils.cpp @@ -118,7 +118,7 @@ std::string CToxProto::DataToHexString(std::vector<uint8_t> data) {
std::ostringstream oss;
oss << std::hex << std::uppercase << std::setfill('0');
- for (int i = 0; i < data.size(); i++)
+ for (size_t i = 0; i < data.size(); i++)
{
oss << std::setw(2) << static_cast<int>(data[i]);
}
|