From d5d023f683b23fe26ddea93738cb721d532804f0 Mon Sep 17 00:00:00 2001 From: Vadim Dashevskiy Date: Thu, 14 Jun 2012 16:22:13 +0000 Subject: another portion of "#ifsef Unicode" removal git-svn-id: http://svn.miranda-ng.org/main/trunk@411 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Yahoo/avatar.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'protocols/Yahoo') diff --git a/protocols/Yahoo/avatar.cpp b/protocols/Yahoo/avatar.cpp index 3c8a9471e7..1ee1a64dd8 100644 --- a/protocols/Yahoo/avatar.cpp +++ b/protocols/Yahoo/avatar.cpp @@ -132,16 +132,12 @@ void CYahooProto::SendAvatar(const TCHAR *szFile) yahoo_file_info *sf = y_new(struct yahoo_file_info, 1); sf->filesize = statbuf.st_size; -#ifdef _UNICODE wchar_t tszFilename[MAX_PATH]; wcscpy(tszFilename, szFile); GetShortPathNameW(szFile, tszFilename, SIZEOF(tszFilename)); char szFilename[MAX_PATH]; WideCharToMultiByte(CP_ACP, 0, tszFilename, -1, szFilename, MAX_PATH, 0, 0); sf->filename = strdup(szFilename); -#else - sf->filename = strdup(szFile); -#endif DebugLog("[Uploading avatar] filename: %s size: %ld", sf->filename, sf->filesize); @@ -253,12 +249,8 @@ void __cdecl CYahooProto::recv_avatarthread(void *pavt) AI.cbSize = sizeof AI; AI.format = PA_FORMAT_PNG; AI.hContact = hContact; - #if defined( _UNICODE ) - WideCharToMultiByte( CP_ACP, 0, buf, -1, AI.filename, sizeof AI.filename, 0, 0 ); - #else - lstrcpyA( AI.filename, buf ); - #endif - + WideCharToMultiByte( CP_ACP, 0, buf, -1, AI.filename, sizeof AI.filename, 0, 0 ); + if (error) SetDword(hContact, "PictCK", 0); -- cgit v1.2.3