diff options
| author | JosJuice <josjuice@gmail.com> | 2020-06-28 18:15:30 +0200 |
|---|---|---|
| committer | JosJuice <josjuice@gmail.com> | 2020-07-08 14:51:35 +0200 |
| commit | 15d9fab0bbe5cae41116c7eb24dc1797f05957c1 (patch) | |
| tree | f445a0d86ae0b8fc0a7e6cd6b106668946191ba1 /Source/Core/Common/Timer.cpp | |
| parent | cd51552fe4f88f725459c27959aa7fbc63c9cedf (diff) | |
Common: Rename UTF16ToUTF8
This function does *not* always convert from UTF-16. It converts
from UTF-16 on Windows and UTF-32 on other operating systems.
Also renaming UTF8ToUTF16 for consistency, even though it
technically doesn't have the same problem since it only was
implemented on Windows.
Diffstat (limited to 'Source/Core/Common/Timer.cpp')
| -rw-r--r-- | Source/Core/Common/Timer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/Common/Timer.cpp b/Source/Core/Common/Timer.cpp index 794f2dfd49..66c71db568 100644 --- a/Source/Core/Common/Timer.cpp +++ b/Source/Core/Common/Timer.cpp @@ -218,7 +218,7 @@ std::string Timer::GetTimeFormatted() #ifdef _WIN32 struct timeb tp; (void)::ftime(&tp); - return UTF16ToUTF8(tmp) + fmt::format(":{:03}", tp.millitm); + return WStringToUTF8(tmp) + fmt::format(":{:03}", tp.millitm); #elif defined __APPLE__ struct timeval t; (void)gettimeofday(&t, nullptr); @@ -276,7 +276,7 @@ std::string Timer::GetDateTimeFormatted(double time) #ifdef _WIN32 wchar_t tmp[32] = {}; wcsftime(tmp, sizeof(tmp), L"%x %X", localTime); - return UTF16ToUTF8(tmp); + return WStringToUTF8(tmp); #else char tmp[32] = {}; strftime(tmp, sizeof(tmp), "%x %X", localTime); |
