mirror of
https://github.com/OpenMW/openmw.git
synced 2025-12-01 01:34:31 +00:00
Fix non-ASCII path logging
This commit is contained in:
parent
5836d27928
commit
8925f854e7
2 changed files with 30 additions and 0 deletions
|
|
@ -39,6 +39,14 @@ Log::~Log()
|
||||||
sLock.unlock();
|
sLock.unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Log& Log::operator<<(const std::filesystem::path&& rhs)
|
||||||
|
{
|
||||||
|
if (mShouldLog)
|
||||||
|
std::cout << Files::pathToUnicodeString(std::move(rhs));
|
||||||
|
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
Log& Log::operator<<(std::filesystem::path&& rhs)
|
Log& Log::operator<<(std::filesystem::path&& rhs)
|
||||||
{
|
{
|
||||||
if (mShouldLog)
|
if (mShouldLog)
|
||||||
|
|
@ -55,6 +63,22 @@ Log& Log::operator<<(const std::filesystem::path& rhs)
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Log& Log::operator<<(std::filesystem::path& rhs)
|
||||||
|
{
|
||||||
|
if (mShouldLog)
|
||||||
|
std::cout << Files::pathToUnicodeString(rhs);
|
||||||
|
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log& Log::operator<<(const std::u8string&& rhs)
|
||||||
|
{
|
||||||
|
if (mShouldLog)
|
||||||
|
std::cout << Misc::StringUtils::u8StringToString(std::move(rhs));
|
||||||
|
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
Log& Log::operator<<(std::u8string&& rhs)
|
Log& Log::operator<<(std::u8string&& rhs)
|
||||||
{
|
{
|
||||||
if (mShouldLog)
|
if (mShouldLog)
|
||||||
|
|
|
||||||
|
|
@ -37,10 +37,16 @@ public:
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Log& operator<<(const std::filesystem::path&& rhs);
|
||||||
|
|
||||||
Log& operator<<(std::filesystem::path&& rhs);
|
Log& operator<<(std::filesystem::path&& rhs);
|
||||||
|
|
||||||
Log& operator<<(const std::filesystem::path& rhs);
|
Log& operator<<(const std::filesystem::path& rhs);
|
||||||
|
|
||||||
|
Log& operator<<(std::filesystem::path& rhs);
|
||||||
|
|
||||||
|
Log& operator<<(const std::u8string&& rhs);
|
||||||
|
|
||||||
Log& operator<<(std::u8string&& rhs);
|
Log& operator<<(std::u8string&& rhs);
|
||||||
|
|
||||||
Log& operator<<(std::u8string_view rhs);
|
Log& operator<<(std::u8string_view rhs);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue