From 274697623e2a6749a3b173c28f4832d9e88019e3 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sat, 12 Feb 2011 11:37:05 -0500 Subject: Remove NULL checks for GObject methods. As of GLib 2.28 all GObject virtual methods, including constructed(), are safe to chain up to unconditionally. Remove unnecessary checks. --- addressbook/gui/contact-editor/e-contact-editor.c | 4 ++-- addressbook/gui/widgets/e-addressbook-selector.c | 4 ++-- addressbook/gui/widgets/e-addressbook-table-adapter.c | 4 ++-- addressbook/gui/widgets/e-addressbook-view.c | 4 ++-- addressbook/gui/widgets/e-minicard-view-widget.c | 4 ++-- addressbook/gui/widgets/e-minicard-view.c | 4 ++-- addressbook/gui/widgets/e-minicard.c | 8 ++++---- 7 files changed, 16 insertions(+), 16 deletions(-) (limited to 'addressbook') diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c index 55709ed081..4c0bf2e905 100644 --- a/addressbook/gui/contact-editor/e-contact-editor.c +++ b/addressbook/gui/contact-editor/e-contact-editor.c @@ -3728,8 +3728,8 @@ e_contact_editor_dispose (GObject *object) e_contact_editor->cancellable = NULL; } - if (G_OBJECT_CLASS (parent_class)->dispose) - (* G_OBJECT_CLASS (parent_class)->dispose) (object); + /* Chain up to parent's dispose() method. */ + G_OBJECT_CLASS (parent_class)->dispose (object); } static void diff --git a/addressbook/gui/widgets/e-addressbook-selector.c b/addressbook/gui/widgets/e-addressbook-selector.c index 110343ce80..018205e09f 100644 --- a/addressbook/gui/widgets/e-addressbook-selector.c +++ b/addressbook/gui/widgets/e-addressbook-selector.c @@ -238,8 +238,8 @@ addressbook_selector_constructed (GObject *object) selector = E_SOURCE_SELECTOR (object); addressbook_selector_load_primary_source (selector); - if (G_OBJECT_CLASS (parent_class)->constructed) - G_OBJECT_CLASS (parent_class)->constructed (object); + /* Chain up to parent's constructed() method. */ + G_OBJECT_CLASS (parent_class)->constructed (object); } static gboolean diff --git a/addressbook/gui/widgets/e-addressbook-table-adapter.c b/addressbook/gui/widgets/e-addressbook-table-adapter.c index 1e88b50209..6dfa981463 100644 --- a/addressbook/gui/widgets/e-addressbook-table-adapter.c +++ b/addressbook/gui/widgets/e-addressbook-table-adapter.c @@ -78,8 +78,8 @@ addressbook_dispose (GObject *object) adapter->priv = NULL; } - if (G_OBJECT_CLASS (parent_class)->dispose) - (* G_OBJECT_CLASS (parent_class)->dispose) (object); + /* Chain up to parent's dispose() method. */ + G_OBJECT_CLASS (parent_class)->dispose (object); } /* This function returns the number of columns in our ETableModel. */ diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c index f85bcfe6d3..5d2636a413 100644 --- a/addressbook/gui/widgets/e-addressbook-view.c +++ b/addressbook/gui/widgets/e-addressbook-view.c @@ -585,8 +585,8 @@ addressbook_view_constructed (GObject *object) g_free (uri); - if (G_OBJECT_CLASS (parent_class)->constructed) - G_OBJECT_CLASS (parent_class)->constructed (object); + /* Chain up to parent's constructed() method. */ + G_OBJECT_CLASS (parent_class)->constructed (object); } static void diff --git a/addressbook/gui/widgets/e-minicard-view-widget.c b/addressbook/gui/widgets/e-minicard-view-widget.c index 855b5c2058..945639f70b 100644 --- a/addressbook/gui/widgets/e-minicard-view-widget.c +++ b/addressbook/gui/widgets/e-minicard-view-widget.c @@ -311,8 +311,8 @@ e_minicard_view_widget_dispose (GObject *object) view->adapter = NULL; } - if (G_OBJECT_CLASS (parent_class)->dispose) - G_OBJECT_CLASS (parent_class)->dispose (object); + /* Chain up to parent's dispose() method. */ + G_OBJECT_CLASS (parent_class)->dispose (object); } static void diff --git a/addressbook/gui/widgets/e-minicard-view.c b/addressbook/gui/widgets/e-minicard-view.c index 0e36bd6b9b..31e2d35306 100644 --- a/addressbook/gui/widgets/e-minicard-view.c +++ b/addressbook/gui/widgets/e-minicard-view.c @@ -364,8 +364,8 @@ e_minicard_view_dispose (GObject *object) view->stop_state_id = 0; view->adapter = NULL; - if (G_OBJECT_CLASS (parent_class)->dispose) - G_OBJECT_CLASS (parent_class)->dispose (object); + /* Chain up to parent's dispose() method. */ + G_OBJECT_CLASS (parent_class)->dispose (object); } static guint diff --git a/addressbook/gui/widgets/e-minicard.c b/addressbook/gui/widgets/e-minicard.c index 07eacac291..ea91b57be1 100644 --- a/addressbook/gui/widgets/e-minicard.c +++ b/addressbook/gui/widgets/e-minicard.c @@ -435,8 +435,8 @@ e_minicard_dispose (GObject *object) e_minicard->list_icon_pixbuf = NULL; } - if (G_OBJECT_CLASS (parent_class)->dispose) - (* G_OBJECT_CLASS (parent_class)->dispose) (object); + /* Chain up to parent's dispose() method. */ + G_OBJECT_CLASS (parent_class)->dispose (object); } static void @@ -459,8 +459,8 @@ e_minicard_finalize (GObject *object) e_minicard->list_icon_pixbuf = NULL; } - if (G_OBJECT_CLASS (parent_class)->finalize) - (* G_OBJECT_CLASS (parent_class)->finalize) (object); + /* Chain up to parent's finalize() method. */ + G_OBJECT_CLASS (parent_class)->finalize (object); } static void -- cgit v1.2.3