From e8a3444b88660953d4741815fd87c54ab3be6e38 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 4 Jul 2006 13:33:19 +0000 Subject: [PATCH] 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." --- src/osgSim/MultiSwitch.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/osgSim/MultiSwitch.cpp b/src/osgSim/MultiSwitch.cpp index 0faf799d2..fc9f27003 100644 --- a/src/osgSim/MultiSwitch.cpp +++ b/src/osgSim/MultiSwitch.cpp @@ -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); }