mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-26 07:26:15 +01:00
binding: Simplify the default transform func
https://bugzilla.gnome.org/show_bug.cgi?id=750369
This commit is contained in:
parent
ace7f6861e
commit
bdc3f149ec
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user