[librsvg] Don't use node1 == node2; use rsvg_node_is_same()
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg] Don't use node1 == node2; use rsvg_node_is_same()
- Date: Fri, 17 Feb 2017 16:39:44 +0000 (UTC)
commit 739c73cfe8c3c9f3a328cf24592faa0945834477
Author: Federico Mena Quintero <federico gnome org>
Date: Thu Feb 16 21:47:55 2017 -0600
Don't use node1 == node2; use rsvg_node_is_same()
The former is invalid now.
rsvg-base.c | 2 +-
rsvg-styles.c | 12 +++---------
2 files changed, 4 insertions(+), 10 deletions(-)
---
diff --git a/rsvg-base.c b/rsvg-base.c
index 9279e0d..78beb70 100644
--- a/rsvg-base.c
+++ b/rsvg-base.c
@@ -1650,7 +1650,7 @@ rsvg_handle_get_position_sub (RsvgHandle * handle, RsvgPositionData * position_d
node = rsvg_defs_lookup (handle->priv->defs, id);
if (!node) {
return FALSE;
- } else if (node == handle->priv->treebase) {
+ } else if (rsvg_node_is_same (node, handle->priv->treebase)) {
/* Root node. */
position_data->x = 0;
position_data->y = 0;
diff --git a/rsvg-styles.c b/rsvg-styles.c
index ba6acc3..a7e1559 100644
--- a/rsvg-styles.c
+++ b/rsvg-styles.c
@@ -1758,8 +1758,8 @@ rsvg_state_reinherit_top (RsvgDrawingCtx * ctx, RsvgState * state, int dominate)
}
}
-static void
-reconstruct_helper (RsvgState *state, RsvgNode *current)
+void
+rsvg_state_reconstruct (RsvgState *state, RsvgNode *current)
{
RsvgNode *currents_parent;
@@ -1768,15 +1768,9 @@ reconstruct_helper (RsvgState *state, RsvgNode *current)
currents_parent = rsvg_node_get_parent (current);
- reconstruct_helper (state, currents_parent);
+ rsvg_state_reconstruct (state, currents_parent);
currents_parent = rsvg_node_unref (currents_parent);
rsvg_state_inherit (state, rsvg_node_get_state (current));
}
-
-void
-rsvg_state_reconstruct (RsvgState * state, RsvgNode * current)
-{
- reconstruct_helper (state, current);
-}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]