From 59a25291f8a065a5525f46ba3974b43dc0fc0384 Mon Sep 17 00:00:00 2001 From: Zackhasacat Date: Tue, 12 Mar 2024 07:29:48 -0500 Subject: [PATCH] Fix errors --- apps/openmw/mwlua/mwscriptbindings.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/openmw/mwlua/mwscriptbindings.cpp b/apps/openmw/mwlua/mwscriptbindings.cpp index c04339f28a..6ccb8c80fd 100644 --- a/apps/openmw/mwlua/mwscriptbindings.cpp +++ b/apps/openmw/mwlua/mwscriptbindings.cpp @@ -65,7 +65,7 @@ namespace MWLua return static_cast(MWBase::Environment::get().getWorld()->getGlobalInt(globalId)); } return 0; - }; + } sol::table initMWScriptBindings(const Context& context) { @@ -146,7 +146,7 @@ namespace MWLua return sol::nullopt; return getGlobalVariableValue(globalId); }, - [](const GlobalStore& store, int index) -> sol::optional { + [](const GlobalStore& store, size_t index) -> sol::optional { if (index < 1 || store.getSize() < index) return sol::nullopt; auto g = store.at(index - 1); @@ -164,7 +164,7 @@ namespace MWLua return getGlobalVariableValue(globalId); }); globalStoreT[sol::meta_function::pairs] = [](const GlobalStore& store) { - int index = 0; + size_t index = 0; return sol::as_function( [index, &store](sol::this_state ts) mutable -> sol::optional> { if (index >= store.getSize())