diff options
author | Murray Cumming <murrayc@murrayc.com> | 2017-04-21 14:54:49 +0200 |
---|---|---|
committer | Murray Cumming <murrayc@murrayc.com> | 2017-07-21 08:20:58 +0200 |
commit | 7902df0362d9b6117973ebc97faa46a3e65158d8 (patch) | |
tree | 04d20e28022c9c52c1053f481848db375e21ba45 | |
parent | f7c2a73eb240ee4e9d88047cbd9d82088e835932 (diff) | |
download | sigc++-7902df0362d9b6117973ebc97faa46a3e65158d8.tar.gz |
trackable: Don't bother checking for null before using delete.
Because deleting null is allowed.
Noticed by clang-tidy.
-rw-r--r-- | sigc++/trackable.cc | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sigc++/trackable.cc b/sigc++/trackable.cc index 5bb4207..5020bc9 100644 --- a/sigc++/trackable.cc +++ b/sigc++/trackable.cc @@ -83,9 +83,7 @@ trackable::remove_destroy_notify_callback(notifiable* data) const void trackable::notify_callbacks() { - if (callback_list_) - delete callback_list_; // This invokes all of the callbacks. - + delete callback_list_; // This invokes all of the callbacks. callback_list_ = nullptr; } |