mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Remove a few unused functions reported by callcatcher (#11658)
This commit is contained in:
parent
6de8d77e17
commit
ecc6f4ba25
24 changed files with 6 additions and 799 deletions
|
@ -421,19 +421,6 @@ void InvRef::create(lua_State *L, const InventoryLocation &loc)
|
|||
luaL_getmetatable(L, className);
|
||||
lua_setmetatable(L, -2);
|
||||
}
|
||||
void InvRef::createPlayer(lua_State *L, RemotePlayer *player)
|
||||
{
|
||||
NO_MAP_LOCK_REQUIRED;
|
||||
InventoryLocation loc;
|
||||
loc.setPlayer(player->getName());
|
||||
create(L, loc);
|
||||
}
|
||||
void InvRef::createNodeMeta(lua_State *L, v3s16 p)
|
||||
{
|
||||
InventoryLocation loc;
|
||||
loc.setNodeMeta(p);
|
||||
create(L, loc);
|
||||
}
|
||||
|
||||
void InvRef::Register(lua_State *L)
|
||||
{
|
||||
|
|
|
@ -111,8 +111,6 @@ public:
|
|||
// Creates an InvRef and leaves it on top of stack
|
||||
// Not callable from Lua; all references are created on the C side.
|
||||
static void create(lua_State *L, const InventoryLocation &loc);
|
||||
static void createPlayer(lua_State *L, RemotePlayer *player);
|
||||
static void createNodeMeta(lua_State *L, v3s16 p);
|
||||
static void Register(lua_State *L);
|
||||
};
|
||||
|
||||
|
|
|
@ -89,7 +89,10 @@ int NodeMetaRef::l_get_inventory(lua_State *L)
|
|||
|
||||
NodeMetaRef *ref = checkobject(L, 1);
|
||||
ref->getmeta(true); // try to ensure the metadata exists
|
||||
InvRef::createNodeMeta(L, ref->m_p);
|
||||
|
||||
InventoryLocation loc;
|
||||
loc.setNodeMeta(ref->m_p);
|
||||
InvRef::create(L, loc);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue