mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-13 07:56:17 +01:00
Simplify g_param_spec_get_redirect_target
There is no need to do a type check in a g_return_if_fail if the type check is tne next thing the function does anyway.
This commit is contained in:
parent
401f78652c
commit
f1f80111c9
@ -579,14 +579,8 @@ g_param_spec_steal_qdata (GParamSpec *pspec,
|
||||
GParamSpec*
|
||||
g_param_spec_get_redirect_target (GParamSpec *pspec)
|
||||
{
|
||||
g_return_val_if_fail (G_IS_PARAM_SPEC (pspec), NULL);
|
||||
|
||||
if (G_IS_PARAM_SPEC_OVERRIDE (pspec))
|
||||
{
|
||||
GParamSpecOverride *ospec = G_PARAM_SPEC_OVERRIDE (pspec);
|
||||
|
||||
return ospec->overridden;
|
||||
}
|
||||
return ((GParamSpecOverride*)pspec)->overridden;
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user