From 46879a24aa0e45ec0ea1ddf27f28ce68edd5e561 Mon Sep 17 00:00:00 2001 From: watcherhd Date: Sun, 27 Nov 2011 22:52:32 +0000 Subject: another part of small project fixes git-svn-id: http://miranda-plugins.googlecode.com/svn/trunk@224 e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb --- ContactsPlus/utils.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'ContactsPlus/utils.cpp') diff --git a/ContactsPlus/utils.cpp b/ContactsPlus/utils.cpp index 864e3bb..a86cdff 100644 --- a/ContactsPlus/utils.cpp +++ b/ContactsPlus/utils.cpp @@ -512,7 +512,7 @@ TCHAR* __fastcall SRCTranslateT(const char* src, const WCHAR* unibuf) int wchars, err; wchars = MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, src, - strlennull(src), NULL, 0); + (int)strlennull(src), NULL, 0); if (wchars == 0) return NULL; // Failure @@ -523,7 +523,7 @@ TCHAR* __fastcall SRCTranslateT(const char* src, const WCHAR* unibuf) unicode[wchars] = 0; err = MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, src, - strlennull(src), unicode, wchars); + (int)strlennull(src), unicode, wchars); if (err != wchars) return NULL; // Failure return (TCHAR*)TranslateW(unicode); @@ -738,7 +738,7 @@ static int utf8_decode(const unsigned char *from, char **to) if (bHasCP_UTF8) { WCHAR *wszTemp = NULL; - int inlen = strlennull((char*)from); + int inlen = (int)strlennull((char*)from); wszTemp = (WCHAR *)_alloca(sizeof(WCHAR) * (inlen + 1)); @@ -813,14 +813,14 @@ TCHAR* ansi_to_tchar(const char* src, int codepage) WCHAR *unicode; int wchars, err; - wchars = MultiByteToWideChar(codepage, MB_PRECOMPOSED, src, strlennull(src), NULL, 0); + wchars = MultiByteToWideChar(codepage, MB_PRECOMPOSED, src, (int)strlennull(src), NULL, 0); if (wchars == 0) return NULL; // Failure unicode = (WCHAR*)malloc((wchars + 1) * sizeof(WCHAR)); unicode[wchars] = 0; - err = MultiByteToWideChar(codepage, MB_PRECOMPOSED, src, strlennull(src), unicode, wchars); + err = MultiByteToWideChar(codepage, MB_PRECOMPOSED, src, (int)strlennull(src), unicode, wchars); if (err != wchars) { SAFE_FREE((void**)&unicode); -- cgit v1.2.3