[librsvg/wip/otte: 1/39] Remove a bunch of unneeded casts
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg/wip/otte: 1/39] Remove a bunch of unneeded casts
- Date: Tue, 20 Oct 2015 12:33:50 +0000 (UTC)
commit d272cfdb02a0ccf72f16bc3117fc2ffa0dc57096
Author: Benjamin Otte <otte redhat com>
Date: Tue Oct 6 21:00:09 2015 +0200
Remove a bunch of unneeded casts
rsvg-base.c | 14 +++++++-------
rsvg-defs.c | 4 ++--
2 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/rsvg-base.c b/rsvg-base.c
index 5eab09d..8ea527e 100644
--- a/rsvg-base.c
+++ b/rsvg-base.c
@@ -1375,13 +1375,13 @@ rsvg_handle_get_dimensions_sub (RsvgHandle * handle, RsvgDimensionData * dimensi
memset (dimension_data, 0, sizeof (RsvgDimensionData));
if (id && *id) {
- sself = (RsvgNode *) rsvg_defs_lookup (handle->priv->defs, id);
+ sself = rsvg_defs_lookup (handle->priv->defs, id);
- if (sself == (RsvgNode *) handle->priv->treebase)
+ if (sself == handle->priv->treebase)
id = NULL;
}
else
- sself = (RsvgNode *) handle->priv->treebase;
+ sself = handle->priv->treebase;
if (!sself && id)
return FALSE;
@@ -1422,7 +1422,7 @@ rsvg_handle_get_dimensions_sub (RsvgHandle * handle, RsvgDimensionData * dimensi
rsvg_state_push (draw);
cairo_save (cr);
- rsvg_node_draw ((RsvgNode *) handle->priv->treebase, draw, 0);
+ rsvg_node_draw (handle->priv->treebase, draw, 0);
bbox = RSVG_CAIRO_RENDER (draw->render)->bbox;
cairo_restore (cr);
@@ -1492,10 +1492,10 @@ rsvg_handle_get_position_sub (RsvgHandle * handle, RsvgPositionData * position_d
memset (position_data, 0, sizeof (*position_data));
memset (&dimension_data, 0, sizeof (dimension_data));
- node = (RsvgNode *) rsvg_defs_lookup (handle->priv->defs, id);
+ node = rsvg_defs_lookup (handle->priv->defs, id);
if (!node) {
return FALSE;
- } else if (node == (RsvgNode *) handle->priv->treebase) {
+ } else if (node == handle->priv->treebase) {
/* Root node. */
position_data->x = 0;
position_data->y = 0;
@@ -1520,7 +1520,7 @@ rsvg_handle_get_position_sub (RsvgHandle * handle, RsvgPositionData * position_d
rsvg_state_push (draw);
cairo_save (cr);
- rsvg_node_draw ((RsvgNode *) handle->priv->treebase, draw, 0);
+ rsvg_node_draw (handle->priv->treebase, draw, 0);
bbox = RSVG_CAIRO_RENDER (draw->render)->bbox;
cairo_restore (cr);
diff --git a/rsvg-defs.c b/rsvg-defs.c
index 7790071..846b49b 100644
--- a/rsvg-defs.c
+++ b/rsvg-defs.c
@@ -106,7 +106,7 @@ rsvg_defs_extern_lookup (const RsvgDefs * defs, const char *filename, const char
}
if (file != NULL)
- return (RsvgNode *) g_hash_table_lookup (file->priv->defs->hash, name);
+ return g_hash_table_lookup (file->priv->defs->hash, name);
else
return NULL;
}
@@ -120,7 +120,7 @@ rsvg_defs_lookup (const RsvgDefs * defs, const char *name)
return NULL;
}
if (hashpos == name) {
- return (RsvgNode *) g_hash_table_lookup (defs->hash, name + 1);
+ return g_hash_table_lookup (defs->hash, name + 1);
} else {
gchar **splitbits;
RsvgNode *toreturn;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]