No need to check if a pointer is null before de-allocating it.
5.3.5/2 of the C++ standard: "In either alternative, if the value of the operand of delete is the null pointer the operation has no effect."
This commit is contained in:
parent
a2cf6fff7b
commit
0f994dbb28
1 changed files with 1 additions and 2 deletions
|
@ -41,8 +41,7 @@ MultiButtonMenuItem::MultiButtonMenuItem(int buttons, const FbTk::BiDiString &la
|
|||
}
|
||||
|
||||
MultiButtonMenuItem::~MultiButtonMenuItem() {
|
||||
if (m_button_exe != 0)
|
||||
delete [] m_button_exe;
|
||||
delete [] m_button_exe;
|
||||
}
|
||||
|
||||
void MultiButtonMenuItem::setCommand(int button, FbTk::RefCount<FbTk::Command<void> > &cmd) {
|
||||
|
|
Loading…
Reference in a new issue