Bug 22553 - Remove unneeded GObject casts.
Summary: Remove unneeded GObject casts.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Trivial
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-29 04:05 PST by Xan Lopez
Modified: 2008-12-01 09:26 PST (History)
0 users

See Also:


Attachments
Remove unneeded GObject casts. (11.28 KB, patch)
2008-11-29 04:13 PST, Xan Lopez
zecke: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Xan Lopez 2008-11-29 04:05:09 PST
g_object_get, g_object_set, g_signal_connect, etc. all take a gpointer argument, so there is no need to cast to GObject with the G_OBJECT macro.
Comment 1 Xan Lopez 2008-11-29 04:13:00 PST
Created attachment 25594 [details]
Remove unneeded GObject casts.
Comment 2 Holger Freyther 2008-11-29 19:44:12 PST
Comment on attachment 25594 [details]
Remove unneeded GObject casts.

> From 986ed09d38f02e5a51fd5b9834cafe06e7e272e1 Mon Sep 17 00:00:00 2001
> From: Xan Lopez <xan@gnome.org>
> Date: Sat, 29 Nov 2008 14:09:59 +0200
> Subject: [PATCH] Remove unneeded GObject casts.
> 
> ---
>  WebKit/gtk/ChangeLog                             |   28 ++++++++++++++++++++++
>  WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp    |   22 ++++++++--------
>  WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp |    4 +-
>  WebKit/gtk/webkit/webkitwebframe.cpp             |    6 ++--
>  WebKit/gtk/webkit/webkitwebview.cpp              |    4 +-
>  WebKit/gtk/webkit/webkitwebwindowfeatures.cpp    |   10 ++++----
>  6 files changed, 51 insertions(+), 23 deletions(-)
> 
> diff --git a/WebKit/gtk/ChangeLog b/WebKit/gtk/ChangeLog
> index 57a6479..62e35b6 100644
> --- a/WebKit/gtk/ChangeLog
> +++ b/WebKit/gtk/ChangeLog
> @@ -1,3 +1,31 @@
> +2008-11-29  Xan Lopez  <xan@gnome.org>
> +
> +        Reviewed by NOBODY (OOPS!).
> +
> +	https://bugs.webkit.org/show_bug.cgi?id=22553

indention wrong? mixing tabs and spaces?

besides that, you are right, g_object_set, g_object_ref, g_object_unref take a plain gpointer and there is no need to cast it.
Comment 3 Christian Dywan 2008-12-01 09:26:32 PST
2008-12-01  Xan Lopez  <xan@gnome.org>

        Reviewed by Holger Freyther.

        http://bugs.webkit.org/show_bug.cgi?id=22553
        Remove unneeded GObject casts.

        Remove unneeded casts to GObject in functions that take a gpointer
        argument.