MapBlock *block = m_env.getMap().getBlockNoCreateNoEx(r.p);
if (block) {
// Delete the old mesh
- if (block->mesh != NULL) {
- delete block->mesh;
- block->mesh = NULL;
- }
+ delete block->mesh;
+ block->mesh = NULL;
if (r.mesh) {
minimap_mapblock = r.mesh->moveMinimapMapblock();
ClientLauncher::~ClientLauncher()
{
- if (receiver)
- delete receiver;
+ delete receiver;
- if (input)
- delete input;
+ delete input;
- if (g_fontengine)
- delete g_fontengine;
+ delete g_fontengine;
if (device)
device->drop();
{
HudElement *e = player->removeHud(event.hudrm.id);
- if (e != NULL)
- delete e;
+ delete e;
}
break;
}
delete m_selected_item;
-
- if (m_form_src != NULL) {
- delete m_form_src;
- }
- if (m_text_dst != NULL) {
- delete m_text_dst;
- }
+ delete m_form_src;
+ delete m_text_dst;
}
void GUIFormSpecMenu::removeChildren()
// form_src is deleted by this GUIFormSpecMenu
void setFormSource(IFormSource *form_src)
{
- if (m_form_src != NULL) {
- delete m_form_src;
- }
+ delete m_form_src;
m_form_src = form_src;
}
// text_dst is deleted by this GUIFormSpecMenu
void setTextDest(TextDest *text_dst)
{
- if (m_text_dst != NULL) {
- delete m_text_dst;
- }
+ delete m_text_dst;
m_text_dst = text_dst;
}
stack_max = 99;
usable = false;
liquids_pointable = false;
- if(tool_capabilities)
- {
- delete tool_capabilities;
- tool_capabilities = NULL;
- }
+ delete tool_capabilities;
+ tool_capabilities = NULL;
groups.clear();
sound_place = SimpleSoundSpec();
sound_place_failed = SimpleSoundSpec();
{
//MutexAutoLock lock(mesh_mutex);
- if(mesh)
- {
- delete mesh;
- mesh = NULL;
- }
+ delete mesh;
+ mesh = NULL;
}
#endif
- if(data)
- delete[] data;
+ delete[] data;
}
bool MapBlock::isValidPositionParent(v3s16 p)
{
assert(refcount_from_queue == 0);
- if (data)
- delete[] data;
+ delete[] data;
}
/*
QueuedMeshUpdate::~QueuedMeshUpdate()
{
- if (data)
- delete data;
+ delete data;
}
/*
private:
void drop()
{
- if(data)
- delete[] data;
+ delete[] data;
}
T *data;
unsigned int m_size;
(*refcount)--;
if(*refcount == 0)
{
- if(data)
- delete[] data;
+ delete[] data;
delete refcount;
}
}
mpz_clear(usr->a);
mpz_clear(usr->A);
mpz_clear(usr->S);
- if (usr->ng) delete_ng(usr->ng);
+ delete_ng(usr->ng);
srp_free(usr->username);
srp_free(usr->username_verifier);
if (usr->password) {