mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-04 02:41:19 +00:00
Make VFS::Path::Normalized constructor from std::string_view explicit
This commit is contained in:
parent
a63528343d
commit
84adb0a148
@ -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…
Reference in New Issue
Block a user