mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 10:17:22 +01:00
Dalamud.Boot: use unicode::convert
This commit is contained in:
parent
45d30ed9d2
commit
edc5826fe0
3 changed files with 7 additions and 19 deletions
|
|
@ -578,16 +578,6 @@ std::vector<std::string> utils::get_env_list(const wchar_t* pcszName) {
|
|||
return res;
|
||||
}
|
||||
|
||||
std::wstring utils::to_wstring(const std::string& str) {
|
||||
if (str.empty()) return std::wstring();
|
||||
size_t convertedChars = 0;
|
||||
size_t newStrSize = str.size() + 1;
|
||||
std::wstring wstr(newStrSize, L'\0');
|
||||
mbstowcs_s(&convertedChars, &wstr[0], newStrSize, str.c_str(), _TRUNCATE);
|
||||
wstr.resize(convertedChars - 1);
|
||||
return wstr;
|
||||
}
|
||||
|
||||
std::filesystem::path utils::get_module_path(HMODULE hModule) {
|
||||
std::wstring buf(MAX_PATH, L'\0');
|
||||
while (true) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue