https://git.reactos.org/?p=reactos.git;a=commitdiff;h=03854056a214e3bcd1acd…
commit 03854056a214e3bcd1acdaf8da077c504a2bd711
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Mon Dec 23 20:19:48 2019 +0900
Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
CommitDate: Mon Dec 23 20:19:48 2019 +0900
[SDK][ATL] Use CStringW in CImage
---
sdk/lib/atl/atlimage.h | 18 ++----------------
1 file changed, 2 insertions(+), 16 deletions(-)
diff --git a/sdk/lib/atl/atlimage.h b/sdk/lib/atl/atlimage.h
index 757dac8f5e2..f124c9a1483 100644
--- a/sdk/lib/atl/atlimage.h
+++ b/sdk/lib/atl/atlimage.h
@@ -377,14 +377,7 @@ public:
HRESULT Load(LPCTSTR pszFileName) throw()
{
// convert the file name string into Unicode
- // TODO: use a string class
-#ifdef UNICODE
- LPCWSTR pszNameW = pszFileName;
-#else
- WCHAR szPath[MAX_PATH];
- ::MultiByteToWideChar(CP_ACP, 0, pszFileName, -1, szPath, MAX_PATH);
- LPCWSTR pszNameW = szPath;
-#endif
+ CStringW pszNameW(pszFileName);
// create a GpBitmap object from file
using namespace Gdiplus;
@@ -555,14 +548,7 @@ public:
// TODO & FIXME: set parameters (m_rgbTransColor etc.)
// convert the file name string into Unicode
- // TODO: use a string class
-#ifdef UNICODE
- LPCWSTR pszNameW = pszFileName;
-#else
- WCHAR szPath[MAX_PATH];
- ::MultiByteToWideChar(CP_ACP, 0, pszFileName, -1, szPath, MAX_PATH);
- LPCWSTR pszNameW = szPath;
-#endif
+ CStringW pszNameW(pszFileName);
// if the file type is null, get the file type from extension
const GUID *FileType = &guidFileType;