[gnome-builder] egg-signal-group: Quick return when setting target to the same value
- From: Garrett Regier <gregier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] egg-signal-group: Quick return when setting target to the same value
- Date: Thu, 14 May 2015 00:59:05 +0000 (UTC)
commit a2d2d81a6a7079115e892e13afbefd97739d634d
Author: Garrett Regier <garrettregier gmail com>
Date: Wed May 13 15:33:49 2015 -0700
egg-signal-group: Quick return when setting target to the same value
contrib/egg/egg-signal-group.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/contrib/egg/egg-signal-group.c b/contrib/egg/egg-signal-group.c
index 89dc8f5..d800929 100644
--- a/contrib/egg/egg-signal-group.c
+++ b/contrib/egg/egg-signal-group.c
@@ -352,15 +352,15 @@ egg_signal_group_set_target (EggSignalGroup *self,
{
g_return_if_fail (EGG_IS_SIGNAL_GROUP (self));
+ if (target == (gpointer)self->target)
+ return;
+
if (!egg_signal_group_check_target_type (self, target))
return;
- if (target != (gpointer)self->target)
- {
- egg_signal_group_unbind (self);
- egg_signal_group_bind (self, target);
- g_object_notify_by_pspec (G_OBJECT (self), gParamSpecs [PROP_TARGET]);
- }
+ egg_signal_group_unbind (self);
+ egg_signal_group_bind (self, target);
+ g_object_notify_by_pspec (G_OBJECT (self), gParamSpecs [PROP_TARGET]);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]