manual braced init

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev
2021-11-11 02:40:47 -08:00
parent 250011f016
commit 29ae84e199
5 changed files with 8 additions and 12 deletions
+2 -2
View File
@@ -31,7 +31,7 @@ AllocatedPath::FromUTF8(std::string_view path_utf8) noexcept
return FromFS(path_utf8);
#else
try {
return AllocatedPath(::PathFromUTF8(path_utf8));
return {::PathFromUTF8(path_utf8)};
} catch (...) {
return nullptr;
}
@@ -44,7 +44,7 @@ AllocatedPath::FromUTF8Throw(std::string_view path_utf8)
#ifdef FS_CHARSET_ALWAYS_UTF8
return FromFS(path_utf8);
#else
return AllocatedPath(::PathFromUTF8(path_utf8));
return {::PathFromUTF8(path_utf8)};
#endif
}