[glib] binding: Simplify the default transform func
- From: Garrett Regier <gregier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] binding: Simplify the default transform func
- Date: Thu, 4 Jun 2015 00:47:32 +0000 (UTC)
commit bdc3f149ec134081943fcd626a1c826cccd05171
Author: Garrett Regier <garrettregier gmail com>
Date: Wed Jun 3 17:16:21 2015 -0700
binding: Simplify the default transform func
https://bugzilla.gnome.org/show_bug.cgi?id=750369
gobject/gbinding.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/gobject/gbinding.c b/gobject/gbinding.c
index f9db9c5..01f00a1 100644
--- a/gobject/gbinding.c
+++ b/gobject/gbinding.c
@@ -256,14 +256,14 @@ default_transform (GBinding *binding,
G_VALUE_TYPE (value_b)))
{
g_value_copy (value_a, value_b);
- goto done;
+ return TRUE;
}
if (g_value_type_transformable (G_VALUE_TYPE (value_a),
G_VALUE_TYPE (value_b)))
{
if (g_value_transform (value_a, value_b))
- goto done;
+ return TRUE;
}
g_warning ("%s: Unable to convert a value of type %s to a "
@@ -274,10 +274,8 @@ default_transform (GBinding *binding,
return FALSE;
}
- else
- g_value_copy (value_a, value_b);
-done:
+ g_value_copy (value_a, value_b);
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]