From 0f994dbb28e2a348f7c254e051622acf88e08226 Mon Sep 17 00:00:00 2001 From: Paul Tagliamonte Date: Fri, 11 Nov 2011 14:29:57 +0000 Subject: 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." --- src/FbTk/MultiButtonMenuItem.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/FbTk/MultiButtonMenuItem.cc b/src/FbTk/MultiButtonMenuItem.cc index 1b61a99..f5b9990 100644 --- a/src/FbTk/MultiButtonMenuItem.cc +++ b/src/FbTk/MultiButtonMenuItem.cc @@ -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 > &cmd) { -- cgit v0.11.2