From 288f4c294ac1be89b151a3f96eb9d5cb9d91055f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Sun, 31 Jul 2022 20:03:54 +0200 Subject: Make WsoFromSz and WsoCopy static member functions of wstring_owner. --- c/common.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'c/common.cpp') diff --git a/c/common.cpp b/c/common.cpp index 3ed2b73..2e16c59 100644 --- a/c/common.cpp +++ b/c/common.cpp @@ -43,7 +43,7 @@ wstring_owner::~wstring_owner() delete p; } -wstring_owner WsoFromSz(const char* const src, const int cp) +wstring_owner wstring_owner::from_narrow(const char* const src, const int cp) { int cbMultiByte = strlen(src)+1; int cchWideChar = MultiByteToWideChar(cp, 0, src, cbMultiByte, NULL, 0); @@ -55,7 +55,7 @@ wstring_owner WsoFromSz(const char* const src, const int cp) return dst; } -wstring_owner WsoCopy(const wchar_t* const src) +wstring_owner wstring_owner::copy(const wchar_t* const src) { const int cb = wcslen(src)+1; wchar_t* dst = new wchar_t[cb]; -- cgit v1.2.3