Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: UE4SS-RE/RE-UE4SS
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: cb0c4bd97761459e4feadf8063a26074f23439fb
Choose a base ref
..
head repository: UE4SS-RE/RE-UE4SS
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 8a0a43b4e49e5e66fdcb6d13072a802ad7498ede
Choose a head ref
Showing with 3 additions and 5 deletions.
  1. +3 −5 UE4SS/src/LuaType/LuaTMap.cpp
8 changes: 3 additions & 5 deletions UE4SS/src/LuaType/LuaTMap.cpp
Original file line number Diff line number Diff line change
@@ -62,7 +62,6 @@ namespace RC::LuaType
base_object.get_metamethods().create(LuaMadeSimple::Lua::MetaMethod::Length,
[](const LuaMadeSimple::Lua& lua) {
auto lua_object = lua.get_userdata<TMap>();
Output::send(STR("Length: {}\n"), lua_object.get_remote_cpp_object()->Num());
lua.set_integer(lua_object.get_remote_cpp_object()->Num());
return 1;
});
@@ -147,9 +146,8 @@ namespace RC::LuaType
pusher_params.property = info.value;
StaticState::m_property_value_pushers[static_cast<int32_t>(info.value_fname.GetComparisonIndex())](pusher_params);

// Call function passing index & the element
// The element is read-only for all trivial types
// The element is writable if it's a UObject
// Call function passing key & value
// Mutating the key is undefined behavior
lua.call_function(2, 0);
}

@@ -207,7 +205,7 @@ namespace RC::LuaType
lua.throw_error("Map key not found.");
}

const PusherParams pusher_params{.operation = LuaMadeSimple::Type::Operation::Get,
const PusherParams pusher_params{.operation = LuaMadeSimple::Type::Operation::GetParam,
.lua = lua,
.base = lua_object.m_base,
.data = value_ptr,