From b657cb2e4ca138848657408e743f0a7e42b1784e Mon Sep 17 00:00:00 2001 From: Andrei Kortunov Date: Sat, 16 Mar 2024 17:22:07 +0400 Subject: [PATCH] Simplify code --- apps/openmw/mwlua/markupbindings.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/openmw/mwlua/markupbindings.cpp b/apps/openmw/mwlua/markupbindings.cpp index 997674b45d..dacdb7ee2c 100644 --- a/apps/openmw/mwlua/markupbindings.cpp +++ b/apps/openmw/mwlua/markupbindings.cpp @@ -19,8 +19,7 @@ namespace MWLua auto vfs = MWBase::Environment::get().getResourceSystem()->getVFS(); api["loadYaml"] = [lua = context.mLua, vfs](std::string_view fileName) { - auto normalizedName = VFS::Path::normalizeFilename(fileName); - auto file = vfs->getNormalized(normalizedName); + Files::IStreamPtr file = vfs->get(VFS::Path::Normalized(fileName)); return LuaUtil::YamlLoader::load(*file, lua->sol()); }; api["decodeYaml"] = [lua = context.mLua](std::string_view inputData) {