summaryrefslogtreecommitdiff
path: root/protocols/Yahoo/avatar.cpp
diff options
context:
space:
mode:
authorVadim Dashevskiy <watcherhd@gmail.com>2012-06-14 16:22:13 +0000
committerVadim Dashevskiy <watcherhd@gmail.com>2012-06-14 16:22:13 +0000
commitd5d023f683b23fe26ddea93738cb721d532804f0 (patch)
tree21e7398686c7a5d1604d58bfb71ca4329c84be66 /protocols/Yahoo/avatar.cpp
parente58823d961a630eb62e60d2ccb443761ba5f1704 (diff)
another portion of "#ifsef Unicode" removal
git-svn-id: http://svn.miranda-ng.org/main/trunk@411 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Yahoo/avatar.cpp')
-rw-r--r--protocols/Yahoo/avatar.cpp12
1 files changed, 2 insertions, 10 deletions
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);