From ff72dea565ea406e17beccc051d50e40e9294b08 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Sun, 30 Aug 2020 07:48:26 +0200 Subject: [PATCH] Prefer GTK+ style casts rather than C-style casts. --- src/ui/gui/psppire-data-editor.c | 4 ++-- src/ui/gui/psppire-keypad.c | 2 +- src/ui/gui/psppire-keypad.h | 4 ++-- src/ui/gui/psppire-means-layer.c | 2 +- src/ui/gui/psppire-scanf.c | 2 +- src/ui/gui/psppire-syntax-window.c | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/ui/gui/psppire-data-editor.c b/src/ui/gui/psppire-data-editor.c index 150e92f311..1928e10820 100644 --- a/src/ui/gui/psppire-data-editor.c +++ b/src/ui/gui/psppire-data-editor.c @@ -55,7 +55,7 @@ static GObjectClass * parent_class = NULL; static void psppire_data_editor_finalize (GObject *obj) { - PsppireDataEditor *de = (PsppireDataEditor *) obj; + PsppireDataEditor *de = PSPPIRE_DATA_EDITOR (obj); if (de->font) pango_font_description_free (de->font); @@ -66,7 +66,7 @@ psppire_data_editor_finalize (GObject *obj) static void psppire_data_editor_dispose (GObject *obj) { - PsppireDataEditor *de = (PsppireDataEditor *) obj; + PsppireDataEditor *de = PSPPIRE_DATA_EDITOR (obj); if (de->dispose_has_run) return; diff --git a/src/ui/gui/psppire-keypad.c b/src/ui/gui/psppire-keypad.c index edf46ac1ed..3c51926f18 100644 --- a/src/ui/gui/psppire-keypad.c +++ b/src/ui/gui/psppire-keypad.c @@ -34,7 +34,7 @@ static GObjectClass * parent_class = NULL; static void psppire_keypad_dispose (GObject *obj) { - PsppireKeypad *kp = (PsppireKeypad *)obj; + PsppireKeypad *kp = PSPPIRE_KEYPAD (obj); if (kp->dispose_has_run) return; diff --git a/src/ui/gui/psppire-keypad.h b/src/ui/gui/psppire-keypad.h index a128ddd149..89ae6b7d31 100644 --- a/src/ui/gui/psppire-keypad.h +++ b/src/ui/gui/psppire-keypad.h @@ -55,8 +55,8 @@ G_BEGIN_DECLS #define PSPPIRE_KEYPAD_TYPE (psppire_keypad_get_type ()) -#define PSPPIRE_KEYPAD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PSPPIRE_KEYPAD_TYPE, Psppire_Keypad)) -#define PSPPIRE_KEYPAD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PSPPIRE_KEYPAD_TYPE, Psppire_KeypadClass)) +#define PSPPIRE_KEYPAD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PSPPIRE_KEYPAD_TYPE, PsppireKeypad)) +#define PSPPIRE_KEYPAD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PSPPIRE_KEYPAD_TYPE, PsppireKeypadClass)) #define PSPPIRE_IS_KEYPAD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PSPPIRE_KEYPAD_TYPE)) #define PSPPIRE_IS_KEYPAD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PSPPIRE_KEYPAD_TYPE)) diff --git a/src/ui/gui/psppire-means-layer.c b/src/ui/gui/psppire-means-layer.c index bc8ab84008..255dc6dfe7 100644 --- a/src/ui/gui/psppire-means-layer.c +++ b/src/ui/gui/psppire-means-layer.c @@ -36,7 +36,7 @@ static GObjectClass *parent_class = NULL; static void psppire_means_layer_dispose (GObject *obj) { - PsppireMeansLayer *w = (PsppireMeansLayer *)obj; + PsppireMeansLayer *w = PSPPIRE_MEANS_LAYER (obj); if (w->dispose_has_run) return; diff --git a/src/ui/gui/psppire-scanf.c b/src/ui/gui/psppire-scanf.c index 1673eea965..986f48c79f 100644 --- a/src/ui/gui/psppire-scanf.c +++ b/src/ui/gui/psppire-scanf.c @@ -238,7 +238,7 @@ static GObjectClass *parent_class = NULL; static void psppire_scanf_dispose (GObject *obj) { - PsppireScanf *w = (PsppireScanf *)obj; + PsppireScanf *w = PSPPIRE_SCANF (obj); if (w->dispose_has_run) return; diff --git a/src/ui/gui/psppire-syntax-window.c b/src/ui/gui/psppire-syntax-window.c index 4da38801d8..3c48684835 100644 --- a/src/ui/gui/psppire-syntax-window.c +++ b/src/ui/gui/psppire-syntax-window.c @@ -115,7 +115,7 @@ psppire_syntax_window_finalize (GObject *object) static void psppire_syntax_window_dispose (GObject *obj) { - PsppireSyntaxWindow *sw = (PsppireSyntaxWindow *)obj; + PsppireSyntaxWindow *sw = PSPPIRE_SYNTAX_WINDOW (obj); GtkClipboard *clip_selection; GtkClipboard *clip_primary; -- 2.30.2