Avoid warnings from g++ 4.3.
[synfig.git] / synfig-core / trunk / src / synfig / savecanvas.cpp
index 645895c..299472b 100644 (file)
@@ -352,7 +352,7 @@ xmlpp::Element* encode_composite(xmlpp::Element* root,ValueNode_Composite::Const
        int i;
        for(i=0;i<value_node->link_count();i++)
        {
-               string name(strprintf("c%d",i+1));
+               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));
@@ -705,7 +705,8 @@ xmlpp::Element* encode_canvas(xmlpp::Element* root,Canvas::ConstHandle canvas)
        }
 
        // Output the <defs> section
-       if(!canvas->is_inline() && !canvas->value_node_list().empty() || !canvas->children().empty())
+       //! \todo check where the parentheses should really go - around the && or the ||?
+       if((!canvas->is_inline() && !canvas->value_node_list().empty()) || !canvas->children().empty())
        {
                xmlpp::Element *node=root->add_child("defs");
                const ValueNodeList &value_node_list(canvas->value_node_list());