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:
Matthias Clasen 2015-09-07 02:33:50 -04:00
parent 401f78652c
commit f1f80111c9

View File

@ -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;
}