Remove .gitignore do nothing is ignored.
[synfig.git] / synfig-core / trunk / src / synfig / valuenode_linear.cpp
index d487b7b..583612e 100644 (file)
@@ -6,7 +6,7 @@
 **
 **     \legal
 **     Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
-**     Copyright (c) 2007 Chris Moore
+**     Copyright (c) 2007, 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
@@ -108,6 +108,9 @@ ValueNode_Linear::~ValueNode_Linear()
 ValueBase
 ValueNode_Linear::operator()(Time t)const
 {
+       if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS"))
+               printf("%s:%d operator()\n", __FILE__, __LINE__);
+
        switch(get_type())
        {
        case ValueBase::TYPE_ANGLE:
@@ -155,21 +158,14 @@ ValueNode_Linear::check_type(ValueBase::Type type)
 }
 
 bool
-ValueNode_Linear::set_link_vfunc(int i,ValueNode::Handle x)
+ValueNode_Linear::set_link_vfunc(int i,ValueNode::Handle value)
 {
        assert(i>=0 && i<link_count());
 
-       if(i==0)
-       {
-               m_=x;
-               signal_child_changed()(i);signal_value_changed()();
-               return true;
-       }
-       if(i==1)
+       switch(i)
        {
-               b_=x;
-               signal_child_changed()(i);signal_value_changed()();
-               return true;
+       case 0: CHECK_TYPE_AND_SET_VALUE(m_, get_type());
+       case 1: CHECK_TYPE_AND_SET_VALUE(b_, get_type());
        }
        return false;
 }