[libsigcplusplus] trackable: Don't bother checking for null before using delete.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsigcplusplus] trackable: Don't bother checking for null before using delete.
- Date: Fri, 21 Jul 2017 06:24:12 +0000 (UTC)
commit 7902df0362d9b6117973ebc97faa46a3e65158d8
Author: Murray Cumming <murrayc murrayc com>
Date: Fri Apr 21 14:54:49 2017 +0200
trackable: Don't bother checking for null before using delete.
Because deleting null is allowed.
Noticed by clang-tidy.
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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]