diff options
author | Paul Tagliamonte <paultag@fluxbox.org> | 2011-11-11 14:29:57 (GMT) |
---|---|---|
committer | Mathias Gumz <akira at fluxbox dot org> | 2012-01-04 06:43:21 (GMT) |
commit | 0f994dbb28e2a348f7c254e051622acf88e08226 (patch) | |
tree | 09d698eada6e44a3426336ce90fddf82c5411e17 /src | |
parent | a2cf6fff7b94cea7be87bb4e175c662c8c50a117 (diff) | |
download | fluxbox_pavel-0f994dbb28e2a348f7c254e051622acf88e08226.zip fluxbox_pavel-0f994dbb28e2a348f7c254e051622acf88e08226.tar.bz2 |
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."
Diffstat (limited to 'src')
-rw-r--r-- | src/FbTk/MultiButtonMenuItem.cc | 3 |
1 files changed, 1 insertions, 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 | |||
41 | } | 41 | } |
42 | 42 | ||
43 | MultiButtonMenuItem::~MultiButtonMenuItem() { | 43 | MultiButtonMenuItem::~MultiButtonMenuItem() { |
44 | if (m_button_exe != 0) | 44 | delete [] m_button_exe; |
45 | delete [] m_button_exe; | ||
46 | } | 45 | } |
47 | 46 | ||
48 | void MultiButtonMenuItem::setCommand(int button, FbTk::RefCount<FbTk::Command<void> > &cmd) { | 47 | void MultiButtonMenuItem::setCommand(int button, FbTk::RefCount<FbTk::Command<void> > &cmd) { |