Make VFS::Path::Normalized constructor from std::string_view explicit

fix-osga-rotate-wildly
elsid 10 months ago
parent a63528343d
commit 84adb0a148
No known key found for this signature in database
GPG Key ID: 4DE04C198CBA7625

@ -328,7 +328,8 @@ namespace MWLua
},
[](const sol::object&) -> sol::object { return sol::nil; });
api["fileExists"] = [vfs](std::string_view fileName) -> bool { return vfs->exists(fileName); };
api["fileExists"]
= [vfs](std::string_view fileName) -> bool { return vfs->exists(VFS::Path::Normalized(fileName)); };
api["pathsWithPrefix"] = [vfs](std::string_view prefix) {
auto iterator = vfs->getRecursiveDirectoryIterator(prefix);
return sol::as_function([iterator, current = iterator.begin()]() mutable -> sol::optional<std::string> {

@ -29,7 +29,7 @@ namespace Resource
static bool collectStatUpdate = false;
static bool collectStatEngine = false;
constexpr std::string_view sFontName = "Fonts/DejaVuLGCSansMono.ttf";
static const VFS::Path::Normalized sFontName("Fonts/DejaVuLGCSansMono.ttf");
static void setupStatCollection()
{

@ -130,7 +130,7 @@ namespace VFS::Path
public:
Normalized() = default;
Normalized(std::string_view value)
explicit Normalized(std::string_view value)
: mValue(normalizeFilename(value))
{
}

Loading…
Cancel
Save