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())