mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
Remove m_ext_ptr in GUIFormSpecMenu, replaced by refcount mechanism
This commit is contained in:
parent
73bf791fe1
commit
b49e5cfc70
5 changed files with 27 additions and 17 deletions
|
@ -68,12 +68,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
/*
|
||||
GUIFormSpecMenu
|
||||
*/
|
||||
|
||||
GUIFormSpecMenu::GUIFormSpecMenu(irr::IrrlichtDevice* dev,
|
||||
gui::IGUIElement* parent, s32 id, IMenuManager *menumgr,
|
||||
InventoryManager *invmgr, IGameDef *gamedef,
|
||||
ISimpleTextureSource *tsrc, IFormSource* fsrc, TextDest* tdst,
|
||||
GUIFormSpecMenu** ext_ptr, Client* client) :
|
||||
Client* client) :
|
||||
GUIModalMenu(dev->getGUIEnvironment(), parent, id, menumgr),
|
||||
m_device(dev),
|
||||
m_invmgr(invmgr),
|
||||
|
@ -89,7 +88,6 @@ GUIFormSpecMenu::GUIFormSpecMenu(irr::IrrlichtDevice* dev,
|
|||
m_lock(false),
|
||||
m_form_src(fsrc),
|
||||
m_text_dst(tdst),
|
||||
m_ext_ptr(ext_ptr),
|
||||
m_font(dev->getGUIEnvironment()->getSkin()->getFont()),
|
||||
m_formspec_version(0)
|
||||
#ifdef __ANDROID__
|
||||
|
@ -130,11 +128,6 @@ GUIFormSpecMenu::~GUIFormSpecMenu()
|
|||
if (m_text_dst != NULL) {
|
||||
delete m_text_dst;
|
||||
}
|
||||
|
||||
if (m_ext_ptr != NULL) {
|
||||
assert(*m_ext_ptr == this);
|
||||
*m_ext_ptr = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void GUIFormSpecMenu::removeChildren()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue