all repos — fluxbox @ 0f994dbb28e2a348f7c254e051622acf88e08226

custom fork of the fluxbox windowmanager

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."
Paul Tagliamonte paultag@fluxbox.org
commit

0f994dbb28e2a348f7c254e051622acf88e08226

parent

a2cf6fff7b94cea7be87bb4e175c662c8c50a117

1 files changed, 1 insertions(+), 2 deletions(-)

jump to
M src/FbTk/MultiButtonMenuItem.ccsrc/FbTk/MultiButtonMenuItem.cc

@@ -41,8 +41,7 @@ init(buttons);

} 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) {