diff options
author | Matthias Clasen <mclasen@redhat.com> | 2015-09-07 02:33:50 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2015-09-07 02:33:50 -0400 |
commit | f1f80111c9bb691c658e8657c450845387cbefd1 (patch) | |
tree | 98b1c423c12431eddc8a1b3d286a3ba04c6ff9de | |
parent | 401f78652c31a6a9eab68197e1634dcb765eabe6 (diff) | |
download | glib-f1f80111c9bb691c658e8657c450845387cbefd1.tar.gz |
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.
-rw-r--r-- | gobject/gparam.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/gobject/gparam.c b/gobject/gparam.c index 677f16cb3..bf2028e97 100644 --- a/gobject/gparam.c +++ b/gobject/gparam.c @@ -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; } |