Added copyright lines for files I've edited this year.
[synfig.git] / synfig-core / trunk / src / synfig / valuenode_dynamiclist.cpp
index 7e8f378..7cdbd1f 100644 (file)
@@ -6,6 +6,7 @@
 **
 **     \legal
 **     Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+**     Copyright (c) 2008 Chris Moore
 **
 **     This package is free software; you can redistribute it and/or
 **     modify it under the terms of the GNU General Public License as
@@ -621,6 +622,7 @@ bool
 ValueNode_DynamicList::set_link_vfunc(int i,ValueNode::Handle x)
 {
        assert(i>=0);
+
        if((unsigned)i>=list.size())
                return false;
        if(x->get_type()!=container_type)
@@ -633,6 +635,7 @@ ValueNode::LooseHandle
 ValueNode_DynamicList::get_link_vfunc(int i)const
 {
        assert(i>=0);
+
        if((unsigned)i>=list.size())
                return 0;
        return list[i].value_node;
@@ -647,7 +650,8 @@ ValueNode_DynamicList::link_count()const
 String
 ValueNode_DynamicList::link_local_name(int i)const
 {
-       assert(i>=0 && (unsigned)i<list.size());
+       assert(i>=0 && i<link_count());
+
        return etl::strprintf(_("Item %03d"),i+1);
 }
 
@@ -719,6 +723,7 @@ LinkableValueNode*
 ValueNode_DynamicList::create_new()const
 {
        assert(0);
+
        return 0;
 }