projects
/
synfig.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Made all the assert() lines which check the valuenode sub-parameter index range the...
[synfig.git]
/
synfig-core
/
trunk
/
src
/
synfig
/
valuenode_twotone.cpp
diff --git
a/synfig-core/trunk/src/synfig/valuenode_twotone.cpp
b/synfig-core/trunk/src/synfig/valuenode_twotone.cpp
index
f92b1ce
..
497af2e
100644
(file)
--- a/
synfig-core/trunk/src/synfig/valuenode_twotone.cpp
+++ b/
synfig-core/trunk/src/synfig/valuenode_twotone.cpp
@@
-116,7
+116,8
@@
synfig::ValueNode_TwoTone::operator()(Time t)const
bool
ValueNode_TwoTone::set_link_vfunc(int i,ValueNode::Handle x)
{
bool
ValueNode_TwoTone::set_link_vfunc(int i,ValueNode::Handle x)
{
- assert(i>=0 && i<3);
+ assert(i>=0 && i<link_count());
+
switch(i)
{
case 0:
switch(i)
{
case 0:
@@
-133,7
+134,8
@@
ValueNode_TwoTone::set_link_vfunc(int i,ValueNode::Handle x)
ValueNode::LooseHandle
ValueNode_TwoTone::get_link_vfunc(int i)const
{
ValueNode::LooseHandle
ValueNode_TwoTone::get_link_vfunc(int i)const
{
- assert(i>=0 && i<3);
+ assert(i>=0 && i<link_count());
+
switch(i)
{
case 0:
switch(i)
{
case 0:
@@
-153,7
+155,8
@@
ValueNode_TwoTone::link_count()const
String
ValueNode_TwoTone::link_local_name(int i)const
{
String
ValueNode_TwoTone::link_local_name(int i)const
{
- assert(i>=0 && i<2);
+ assert(i>=0 && i<link_count());
+
switch(i)
{
case 0:
switch(i)
{
case 0:
@@
-168,7
+171,8
@@
ValueNode_TwoTone::link_local_name(int i)const
String
ValueNode_TwoTone::link_name(int i)const
{
String
ValueNode_TwoTone::link_name(int i)const
{
- assert(i>=0 && i<2);
+ assert(i>=0 && i<link_count());
+
switch(i)
{
case 0:
switch(i)
{
case 0: