From fc6d3aabad27fd3b4cf95b4d9fafd96a91e9f640 Mon Sep 17 00:00:00 2001 From: dooglus Date: Thu, 7 Feb 2008 22:17:43 +0000 Subject: [PATCH] Delete the 'encode_composite' function. Composite valuenodes are just a special kind of Linkable valuenode and don't need special code to save them. git-svn-id: http://svn.voria.com/code@1620 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-core/trunk/src/synfig/savecanvas.cpp | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/synfig-core/trunk/src/synfig/savecanvas.cpp b/synfig-core/trunk/src/synfig/savecanvas.cpp index 299472b..d381c78 100644 --- a/synfig-core/trunk/src/synfig/savecanvas.cpp +++ b/synfig-core/trunk/src/synfig/savecanvas.cpp @@ -342,27 +342,6 @@ xmlpp::Element* encode_animated(xmlpp::Element* root,ValueNode_Animated::ConstHa return root; } -xmlpp::Element* encode_composite(xmlpp::Element* root,ValueNode_Composite::ConstHandle value_node,Canvas::ConstHandle canvas=0) -{ - assert(value_node); - root->set_name("composite"); - - root->set_attribute("type",ValueBase::type_name(value_node->get_type())); - - int i; - for(i=0;ilink_count();i++) - { - string name(value_node->link_name(i)); - assert(value_node->get_link(i)); - if(value_node->get_link(i)->is_exported()) - root->set_attribute(name,value_node->get_link(i)->get_relative_id(canvas)); - else - encode_value_node(root->add_child(name)->add_child("value_node"),value_node->get_link(i).constant(),canvas); - } - - return root; -} - xmlpp::Element* encode_subtract(xmlpp::Element* root,ValueNode_Subtract::ConstHandle value_node,Canvas::ConstHandle canvas=0) { assert(value_node); @@ -517,9 +496,6 @@ xmlpp::Element* encode_value_node(xmlpp::Element* root,ValueNode::ConstHandle va if(ValueNode_Animated::ConstHandle::cast_dynamic(value_node)) encode_animated(root,ValueNode_Animated::ConstHandle::cast_dynamic(value_node),canvas); else - if(ValueNode_Composite::ConstHandle::cast_dynamic(value_node)) - encode_composite(root,ValueNode_Composite::ConstHandle::cast_dynamic(value_node),canvas); - else if(ValueNode_Subtract::ConstHandle::cast_dynamic(value_node)) encode_subtract(root,ValueNode_Subtract::ConstHandle::cast_dynamic(value_node),canvas); else -- 2.7.4