diff options
Diffstat (limited to 'c/common.cpp')
-rw-r--r-- | c/common.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/c/common.cpp b/c/common.cpp index ca8dfac..bc2d4af 100644 --- a/c/common.cpp +++ b/c/common.cpp @@ -56,14 +56,14 @@ Library::~Library() } /* Convert narrow unmanaged string to wide managed string. */ -std::wstring WstrFromSz(const char* sz, int iCp) +std::wstring WsFromSz(const char* sz, int iCp) { int cbMultiByte = strlen(sz)+1; int cchWideChar = MultiByteToWideChar(iCp, 0, sz, cbMultiByte, NULL, 0); - std::wstring wstr(cchWideChar, 0); - if (!MultiByteToWideChar(iCp, 0, sz, cbMultiByte, wstr.data(), cchWideChar)) + std::wstring ws(cchWideChar, 0); + if (!MultiByteToWideChar(iCp, 0, sz, cbMultiByte, ws.data(), cchWideChar)) throw Win32Error(GetLastError()); - return wstr; + return ws; } /* Move message box to center of main window. */ |