diff --git a/Redirector/Utils.cpp b/Redirector/Utils.cpp index f340732c..3ec9d50d 100644 --- a/Redirector/Utils.cpp +++ b/Redirector/Utils.cpp @@ -1,6 +1,6 @@ #include "Utils.h" -string ws2s(const wstring str) +string ws2s(wstring str) { auto length = WideCharToMultiByte(CP_ACP, 0, str.c_str(), static_cast(str.length()), NULL, 0, NULL, NULL); auto buffer = new char[length + 1](); @@ -13,7 +13,7 @@ string ws2s(const wstring str) return data; } -wstring s2ws(const string str) +wstring s2ws(string str) { auto length = MultiByteToWideChar(CP_ACP, 0, str.c_str(), static_cast(str.length()), NULL, 0); auto buffer = new wchar_t[length + 1](); diff --git a/Redirector/Utils.h b/Redirector/Utils.h index 71da270b..472e0bd1 100644 --- a/Redirector/Utils.h +++ b/Redirector/Utils.h @@ -3,6 +3,6 @@ #define UTILS_H #include "Based.h" -string ws2s(const wstring str); -wstring s2ws(const string str); +string ws2s(wstring str); +wstring s2ws(string str); #endif