summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPeter Moulder <peter.moulder@monash.edu>2007-10-11 13:47:48 +0000
committerpjrm <pjrm@users.sourceforge.net>2007-10-11 13:47:48 +0000
commit585a146c902ece3bed826b1322c3911fb8fbde35 (patch)
tree718d79d8ca031ecc7256eba17ea03c14af124fe7 /src
parentAvoid string literal char* warnings on g++-4.2: change some functions to take... (diff)
downloadinkscape-585a146c902ece3bed826b1322c3911fb8fbde35.tar.gz
inkscape-585a146c902ece3bed826b1322c3911fb8fbde35.zip
Provide Node const* versions of existing sp_repr_children and sp_repr_next functions.
(bzr r3875)
Diffstat (limited to 'src')
-rw-r--r--src/xml/repr.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/xml/repr.h b/src/xml/repr.h
index 23786d3b8..497cda119 100644
--- a/src/xml/repr.h
+++ b/src/xml/repr.h
@@ -148,11 +148,21 @@ inline Inkscape::XML::Node *sp_repr_parent(Inkscape::XML::Node const *repr) {
}
/// Returns first child of node, resets iterator.
+inline Inkscape::XML::Node const *sp_repr_children(Inkscape::XML::Node const *repr) {
+ return ( repr ? repr->firstChild() : NULL );
+}
+
+/// Returns first child of node, resets iterator.
inline Inkscape::XML::Node *sp_repr_children(Inkscape::XML::Node *repr) {
return ( repr ? repr->firstChild() : NULL );
}
/// Returns next child of node or NULL.
+inline Inkscape::XML::Node const *sp_repr_next(Inkscape::XML::Node const *repr) {
+ return ( repr ? repr->next() : NULL );
+}
+
+/// Returns next child of node or NULL.
inline Inkscape::XML::Node *sp_repr_next(Inkscape::XML::Node *repr) {
return ( repr ? repr->next() : NULL );
}