diff options
| author | Jabier Arraiza <jabier.arraiza@marker.es> | 2017-11-03 00:10:02 +0000 |
|---|---|---|
| committer | Jabier Arraiza <jabier.arraiza@marker.es> | 2017-11-03 00:10:02 +0000 |
| commit | d2df0412f728dd5bb54537dfdfe7c35b34d40e0e (patch) | |
| tree | e2703384779e83312c456399999997fcc289c5cf /src/xml/simple-node.cpp | |
| parent | Merge branch 'master' into powerpencil (diff) | |
| parent | change assignment to equality (diff) | |
| download | inkscape-d2df0412f728dd5bb54537dfdfe7c35b34d40e0e.tar.gz inkscape-d2df0412f728dd5bb54537dfdfe7c35b34d40e0e.zip | |
Merge branch 'master' into powerpencil
Diffstat (limited to 'src/xml/simple-node.cpp')
| -rw-r--r-- | src/xml/simple-node.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/xml/simple-node.cpp b/src/xml/simple-node.cpp index 6bd47fd22..78fc52a27 100644 --- a/src/xml/simple-node.cpp +++ b/src/xml/simple-node.cpp @@ -36,7 +36,7 @@ namespace XML { namespace { -Util::ptr_shared<char> stringify_node(Node const &node) { +Util::ptr_shared stringify_node(Node const &node) { gchar *string; switch (node.type()) { case ELEMENT_NODE: { @@ -59,7 +59,7 @@ Util::ptr_shared<char> stringify_node(Node const &node) { default: string = g_strdup_printf("unknown(%p)", &node); } - Util::ptr_shared<char> result=Util::share_string(string); + Util::ptr_shared result=Util::share_string(string); g_free(string); return result; } @@ -68,7 +68,7 @@ typedef Debug::SimpleEvent<Debug::Event::XML> DebugXML; class DebugXMLNode : public DebugXML { public: - DebugXMLNode(Node const &node, Util::ptr_shared<char> name) + DebugXMLNode(Node const &node, Util::ptr_shared name) : DebugXML(name) { _addProperty("node", stringify_node(node)); @@ -115,7 +115,7 @@ public: class DebugSetContent : public DebugXMLNode { public: DebugSetContent(Node const &node, - Util::ptr_shared<char> content) + Util::ptr_shared content) : DebugXMLNode(node, Util::share_static_string("set-content")) { _addProperty("content", content); @@ -133,7 +133,7 @@ class DebugSetAttribute : public DebugXMLNode { public: DebugSetAttribute(Node const &node, GQuark name, - Util::ptr_shared<char> value) + Util::ptr_shared value) : DebugXMLNode(node, Util::share_static_string("set-attribute")) { _addProperty("name", Util::share_static_string(g_quark_to_string(name))); @@ -290,8 +290,8 @@ void SimpleNode::_setParent(SimpleNode *parent) { } void SimpleNode::setContent(gchar const *content) { - ptr_shared<char> old_content=_content; - ptr_shared<char> new_content = ( content ? share_string(content) : ptr_shared<char>() ); + ptr_shared old_content=_content; + ptr_shared new_content = ( content ? share_string(content) : ptr_shared() ); Debug::EventTracker<> tracker; if (new_content) { @@ -365,9 +365,9 @@ SimpleNode::setAttribute(gchar const *name, gchar const *value, bool const /*is_ } Debug::EventTracker<> tracker; - ptr_shared<char> old_value=( existing ? existing->value : ptr_shared<char>() ); + ptr_shared old_value=( existing ? existing->value : ptr_shared() ); - ptr_shared<char> new_value=ptr_shared<char>(); + ptr_shared new_value=ptr_shared(); if (cleaned_value) { new_value = share_string(cleaned_value); tracker.set<DebugSetAttribute>(*this, key, new_value); |
