From b966497200b47ca5efb3a5853891ea4590927371 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Tue, 26 Jul 2022 19:41:11 +0200 Subject: Use 's' instead of 'str' for as prefix for managed strings. --- c/common.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'c/common.cpp') 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. */ -- cgit v1.2.3