summaryrefslogtreecommitdiffstats
path: root/src/xml/repr-io.cpp
diff options
context:
space:
mode:
authorPeter Moulder <peter.moulder@monash.edu>2009-04-06 23:50:14 +0000
committerpjrm <pjrm@users.sourceforge.net>2009-04-06 23:50:14 +0000
commitdedd7802e24d857442d31b0538bd597167089d9f (patch)
treebc49a3743e3c64062ef1aed515f28fa3565d14bd /src/xml/repr-io.cpp
parentRemove trivial wrapper function sp_repr_print that hasn't been used in years. (diff)
downloadinkscape-dedd7802e24d857442d31b0538bd597167089d9f.tar.gz
inkscape-dedd7802e24d857442d31b0538bd597167089d9f.zip
functional noop: xml/repr-io.cpp: (sp_repr_save_writer): Mark static. Slight shortening of implementation.
(bzr r7641)
Diffstat (limited to 'src/xml/repr-io.cpp')
-rw-r--r--src/xml/repr-io.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/xml/repr-io.cpp b/src/xml/repr-io.cpp
index adeac9735..a659ab61f 100644
--- a/src/xml/repr-io.cpp
+++ b/src/xml/repr-io.cpp
@@ -528,7 +528,7 @@ sp_repr_svg_read_node (Document *xml_doc, xmlNodePtr node, const gchar *default_
}
-void
+static void
sp_repr_save_writer(Document *doc, Inkscape::IO::Writer *out,
gchar const *default_ns)
{
@@ -544,17 +544,17 @@ sp_repr_save_writer(Document *doc, Inkscape::IO::Writer *out,
out->writeString( str );
}
- Node *repr = sp_repr_document_first_child(doc);
- for ( repr = sp_repr_document_first_child(doc) ;
- repr ; repr = sp_repr_next(repr) )
+ for (Node *repr = sp_repr_document_first_child(doc);
+ repr; repr = sp_repr_next(repr))
{
- if ( repr->type() == Inkscape::XML::ELEMENT_NODE ) {
+ Inkscape::XML::NodeType const node_type = repr->type();
+ if ( node_type == Inkscape::XML::ELEMENT_NODE ) {
sp_repr_write_stream_root_element(repr, *out, TRUE, default_ns, inlineattrs, indent);
- } else if ( repr->type() == Inkscape::XML::COMMENT_NODE ) {
- sp_repr_write_stream(repr, *out, 0, TRUE, GQuark(0), inlineattrs, indent);
- out->writeChar( '\n' );
} else {
sp_repr_write_stream(repr, *out, 0, TRUE, GQuark(0), inlineattrs, indent);
+ if ( node_type == Inkscape::XML::COMMENT_NODE ) {
+ out->writeChar('\n');
+ }
}
}
}