From Brede Johansen,

"The attached file corrects two small typos in MultiSwitch.cpp.  The
local "values" reference and the "_values" member attribute are of
different types but both are vectors so the size() operator happily
compiles.  A renaming of _values to _masks or similar may be a more
future proof solution but the submission only removes the underscore
in two places.

The switch_1701.flt model part of the Creator gallery revealed this bug."
This commit is contained in:
Robert Osfield
2006-07-04 13:33:19 +00:00
parent 7511fce540
commit e8a3444b88

View File

@@ -60,7 +60,7 @@ bool MultiSwitch::addChild( osg::Node *child)
++itr)
{
ValueList& values = *itr;
if (_children.size()>_values.size())
if (_children.size()>values.size())
{
values.resize(_children.size(),_newChildDefaultValue);
values[childPosition]=_newChildDefaultValue;
@@ -80,7 +80,7 @@ bool MultiSwitch::insertChild( unsigned int index, osg::Node *child)
++itr)
{
ValueList& values = *itr;
if (index>=_values.size())
if (index>=values.size())
{
values.push_back(_newChildDefaultValue);
}