From 11fcecff7c310c2cc10bda2ab2fa2daf525be571 Mon Sep 17 00:00:00 2001 From: Vadim Dashevskiy Date: Wed, 13 Mar 2013 08:00:41 +0000 Subject: - another portion of '#ifdef UNICODE' clean up git-svn-id: http://svn.miranda-ng.org/main/trunk@3993 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/AvatarHistory/src/AvatarDlg.cpp | 4 ---- plugins/AvatarHistory/src/AvatarHistory.cpp | 23 ++--------------------- 2 files changed, 2 insertions(+), 25 deletions(-) (limited to 'plugins/AvatarHistory') diff --git a/plugins/AvatarHistory/src/AvatarDlg.cpp b/plugins/AvatarHistory/src/AvatarDlg.cpp index c79374a1ec..435b8fea6f 100644 --- a/plugins/AvatarHistory/src/AvatarDlg.cpp +++ b/plugins/AvatarHistory/src/AvatarDlg.cpp @@ -86,11 +86,7 @@ int OpenAvatarDialog(HANDLE hContact, char* fn) } else { -#ifdef _UNICODE MultiByteToWideChar(CP_ACP, 0, fn, -1, avdlg->fn, MAX_REGS(avdlg->fn)); -#else - lstrcpyn(avdlg->fn, fn, sizeof(avdlg->fn)); -#endif } CloseHandle(CreateThread(NULL, 0, AvatarDialogThread, (LPVOID)avdlg, 0, &dwId)); diff --git a/plugins/AvatarHistory/src/AvatarHistory.cpp b/plugins/AvatarHistory/src/AvatarHistory.cpp index 4c33dfa38a..27b6c3b579 100644 --- a/plugins/AvatarHistory/src/AvatarHistory.cpp +++ b/plugins/AvatarHistory/src/AvatarHistory.cpp @@ -315,17 +315,8 @@ void ErrorExit(HANDLE hContact,LPTSTR lpszFunction) LocalFree(lpDisplayBuf); } -#ifdef _UNICODE - #define CS "%S" -#else - -#define CS "%s" - -#endif - - TCHAR * GetExtension(TCHAR *file) { if(file == NULL) return _T(""); @@ -734,13 +725,9 @@ BOOL CreateShortcut(TCHAR *file, TCHAR *shortcut) if (SUCCEEDED(hr)) { -#ifdef _UNICODE + hr = ppf->Save(shortcut, TRUE); -#else - WCHAR tmp[MAX_PATH]; - MultiByteToWideChar(CP_ACP, 0, shortcut, -1, tmp, MAX_PATH); - hr = ppf->Save(tmp, TRUE); -#endif + ppf->Release(); } @@ -768,13 +755,7 @@ BOOL ResolveShortcut(TCHAR *shortcut, TCHAR *file) if (SUCCEEDED(hr)) { -#ifdef _UNICODE hr = ppf->Load(shortcut, STGM_READ); -#else - WCHAR tmp[MAX_PATH]; - MultiByteToWideChar(CP_ACP, 0, shortcut, -1, tmp, MAX_PATH); - hr = ppf->Load(tmp, STGM_READ); -#endif if (SUCCEEDED(hr)) { -- cgit v1.2.3