mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-28 01:57:14 +02: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:
@@ -579,14 +579,8 @@ g_param_spec_steal_qdata (GParamSpec *pspec,
|
|||||||
GParamSpec*
|
GParamSpec*
|
||||||
g_param_spec_get_redirect_target (GParamSpec *pspec)
|
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))
|
if (G_IS_PARAM_SPEC_OVERRIDE (pspec))
|
||||||
{
|
return ((GParamSpecOverride*)pspec)->overridden;
|
||||||
GParamSpecOverride *ospec = G_PARAM_SPEC_OVERRIDE (pspec);
|
|
||||||
|
|
||||||
return ospec->overridden;
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user