From 30db615333bebffeef31e5fe6ccac928c3c2fb36 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 30 Nov 2001 20:53:50 +0000 Subject: [PATCH] Fixed bug in osg::StateSet::merge(..) where the containers were being iterated from begin() to begin() rather than begin() to end(). --- src/osg/StateSet.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/osg/StateSet.cpp b/src/osg/StateSet.cpp index 08f2303af..62b498a20 100644 --- a/src/osg/StateSet.cpp +++ b/src/osg/StateSet.cpp @@ -167,7 +167,7 @@ void StateSet::merge(const StateSet& rhs) // merge the modes of rhs into this, // this overrides rhs if OVERRIDE defined in this. for(ModeList::const_iterator rhs_mitr = rhs._modeList.begin(); - rhs_mitr != rhs._modeList.begin(); + rhs_mitr != rhs._modeList.end(); ++rhs_mitr) { ModeList::iterator lhs_mitr = _modeList.find(rhs_mitr->first); @@ -190,7 +190,7 @@ void StateSet::merge(const StateSet& rhs) // merge the attributes of rhs into this, // this overrides rhs if OVERRIDE defined in this. for(AttributeList::const_iterator rhs_aitr = rhs._attributeList.begin(); - rhs_aitr != rhs._attributeList.begin(); + rhs_aitr != rhs._attributeList.end(); ++rhs_aitr) { AttributeList::iterator lhs_aitr = _attributeList.find(rhs_aitr->first); @@ -209,6 +209,11 @@ void StateSet::merge(const StateSet& rhs) _attributeList.insert(*rhs_aitr); } } + + // need to merge rendering hints + // but will need to think how best to do this first + // RO, Nov. 2001. + }