summaryrefslogtreecommitdiffstats
path: root/src/text-context.cpp
diff options
context:
space:
mode:
authorRalf Stephan <ralf@ark.in-berlin.de>2006-05-30 10:06:47 +0000
committerrwst <rwst@users.sourceforge.net>2006-05-30 10:06:47 +0000
commit0d7552b26e89bf8f5dc0690e35889f582b9ffb01 (patch)
tree20873c6a721463b345467880de30226a3122fee5 /src/text-context.cpp
parentrevert patch 12062:12063, deemed unsafe, with better alternatives (diff)
downloadinkscape-0d7552b26e89bf8f5dc0690e35889f582b9ffb01.tar.gz
inkscape-0d7552b26e89bf8f5dc0690e35889f582b9ffb01.zip
removing some gcc4.1 warnings the right way
(bzr r1082)
Diffstat (limited to 'src/text-context.cpp')
-rw-r--r--src/text-context.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/text-context.cpp b/src/text-context.cpp
index 641d8bce2..964588794 100644
--- a/src/text-context.cpp
+++ b/src/text-context.cpp
@@ -1356,9 +1356,11 @@ sp_text_context_style_query(SPStyle *style, int property, SPTextContext *tc)
if (!begin_it.prevCharacter())
end_it.nextCharacter();
for (Inkscape::Text::Layout::iterator it = begin_it ; it < end_it ; it.nextStartOfSpan()) {
- SPObject const *pos_obj = NULL;
- layout->getSourceOfCharacter(it, (void**)&pos_obj);
- if (pos_obj == NULL) continue;
+ SPObject const *pos_obj = 0;
+ void *rawptr = 0;
+ layout->getSourceOfCharacter(it, &rawptr);
+ pos_obj = SP_OBJECT(rawptr);
+ if (pos_obj == 0) continue;
while (SP_OBJECT_STYLE(pos_obj) == NULL && SP_OBJECT_PARENT(pos_obj))
pos_obj = SP_OBJECT_PARENT(pos_obj); // SPStrings don't have style
styles_list = g_slist_prepend(styles_list, (gpointer)pos_obj);