fs/Charset: pass std::string_view to PathToUTF8()
This commit is contained in:
parent
0a4c5edc3b
commit
f13f66487a
@ -92,13 +92,8 @@ FixSeparators(const PathTraitsUTF8::string_view _s)
|
||||
}
|
||||
|
||||
PathTraitsUTF8::string
|
||||
PathToUTF8(PathTraitsFS::const_pointer path_fs)
|
||||
PathToUTF8(PathTraitsFS::string_view path_fs)
|
||||
{
|
||||
#if !CLANG_CHECK_VERSION(3,6)
|
||||
/* disabled on clang due to -Wtautological-pointer-compare */
|
||||
assert(path_fs != nullptr);
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
const auto buffer = WideCharToMultiByte(CP_UTF8, path_fs);
|
||||
return FixSeparators(buffer);
|
||||
|
@ -44,9 +44,8 @@ DeinitFSCharset() noexcept;
|
||||
*
|
||||
* Throws std::runtime_error on error.
|
||||
*/
|
||||
gcc_nonnull_all
|
||||
PathTraitsUTF8::string
|
||||
PathToUTF8(PathTraitsFS::const_pointer path_fs);
|
||||
PathToUTF8(PathTraitsFS::string_view path_fs);
|
||||
|
||||
/**
|
||||
* Convert the path from UTF-8.
|
||||
|
Loading…
Reference in New Issue
Block a user