diff options
author | John Ankarström <john@ankarstrom.se> | 2022-07-26 19:41:11 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2022-07-26 19:41:11 +0200 |
commit | b966497200b47ca5efb3a5853891ea4590927371 (patch) | |
tree | 45670cff2c4682f0d0c1b1e33c1dddadfe8d58d7 /c/common.cpp | |
parent | 547cbe578dcdb5aa5cfdac1cdb327f92bad21219 (diff) | |
download | EpisodeBrowser-b966497200b47ca5efb3a5853891ea4590927371.tar.gz |
Use 's' instead of 'str' for as prefix for managed strings.
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. */ |