diff options
| author | Rye <rye@lindenlab.com> | 2025-02-11 05:02:45 -0500 |
|---|---|---|
| committer | Rye <rye@lindenlab.com> | 2025-02-11 05:55:37 -0500 |
| commit | 179b29252d8bb28e11686a1852c8e8ffcd98ecc0 (patch) | |
| tree | d805c1794f15b4c67aae69fef77941e1257d87b6 /indra/llfilesystem/lldir_win32.cpp | |
| parent | 9b060f7fccfed39a7c24dafaa4c66da0cfc4984d (diff) | |
Rework windows to use zc:wchar_t for better c++ conformance and compatibility with modern libraries
Diffstat (limited to 'indra/llfilesystem/lldir_win32.cpp')
| -rw-r--r-- | indra/llfilesystem/lldir_win32.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/indra/llfilesystem/lldir_win32.cpp b/indra/llfilesystem/lldir_win32.cpp index a607c70b44..58c080c982 100644 --- a/indra/llfilesystem/lldir_win32.cpp +++ b/indra/llfilesystem/lldir_win32.cpp @@ -172,7 +172,7 @@ LLDir_Win32::LLDir_Win32() { w_str[wcslen(w_str)-1] = '\0'; /* Flawfinder: ignore */ // remove trailing slash } - mTempDir = utf16str_to_utf8str(llutf16string(w_str)); + mTempDir = ll_convert<std::string>(std::wstring(w_str)); if (mOSUserDir.empty()) { @@ -225,14 +225,14 @@ LLDir_Win32::LLDir_Win32() // Set working directory, for LLDir::getWorkingDir() GetCurrentDirectory(MAX_PATH, w_str); - mWorkingDir = utf16str_to_utf8str(llutf16string(w_str)); + mWorkingDir = ll_convert<std::string>(std::wstring(w_str)); // Set the executable directory S32 size = GetModuleFileName(NULL, w_str, MAX_PATH); if (size) { w_str[size] = '\0'; - mExecutablePathAndName = utf16str_to_utf8str(llutf16string(w_str)); + mExecutablePathAndName = ll_convert<std::string>(std::wstring(w_str)); auto path_end = mExecutablePathAndName.find_last_of('\\'); if (path_end != std::string::npos) { @@ -347,8 +347,8 @@ U32 LLDir_Win32::countFilesInDir(const std::string &dirname, const std::string & WIN32_FIND_DATA FileData; - llutf16string pathname = utf8str_to_utf16str(dirname); - pathname += utf8str_to_utf16str(mask); + std::wstring pathname = ll_convert<std::wstring>(dirname); + pathname += ll_convert<std::wstring>(mask); if ((count_search_h = FindFirstFile(pathname.c_str(), &FileData)) != INVALID_HANDLE_VALUE) { @@ -370,7 +370,7 @@ std::string LLDir_Win32::getCurPath() WCHAR w_str[MAX_PATH]; GetCurrentDirectory(MAX_PATH, w_str); - return utf16str_to_utf8str(llutf16string(w_str)); + return ll_convert<std::string>(std::wstring(w_str)); } |
