From 0e6d702906dcb28f8738204507e90eb096841ba7 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 11 Dec 2002 10:07:14 +0000 Subject: [PATCH] Fixes for Win32. --- src/osgPlugins/osg/Switch.cpp | 4 ++-- src/osgSim/LightPointDrawable.cpp | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/osgPlugins/osg/Switch.cpp b/src/osgPlugins/osg/Switch.cpp index cf3d536e1..ce87005d6 100644 --- a/src/osgPlugins/osg/Switch.cpp +++ b/src/osgPlugins/osg/Switch.cpp @@ -69,7 +69,7 @@ bool Switch_readLocalData(Object& obj, Input& fr) { int value; fr[1].getInt(value); - sw.setNewChildDefaultValue(value); + sw.setNewChildDefaultValue(value!=0); iteratorAdvanced = true; fr += 2; } @@ -88,7 +88,7 @@ bool Switch_readLocalData(Object& obj, Input& fr) int value; if (fr[0].getInt(value)) { - sw.setValue(pos,value); + sw.setValue(pos,value!=0); ++pos; } ++fr; diff --git a/src/osgSim/LightPointDrawable.cpp b/src/osgSim/LightPointDrawable.cpp index 704e50926..7a0cc459e 100644 --- a/src/osgSim/LightPointDrawable.cpp +++ b/src/osgSim/LightPointDrawable.cpp @@ -49,15 +49,16 @@ LightPointDrawable::LightPointDrawable(const LightPointDrawable& lpd,const osg:: void LightPointDrawable::reset() { - for(SizedLightPointList::iterator itr=_sizedOpaqueLightPointList.begin(); + SizedLightPointList::iterator itr; + for(itr=_sizedOpaqueLightPointList.begin(); itr!=_sizedOpaqueLightPointList.end(); ++itr) { if (!itr->empty()) itr->erase(itr->begin(),itr->end()); } - - for(SizedLightPointList::iterator itr=_sizedAdditiveLightPointList.begin(); + + for(itr=_sizedAdditiveLightPointList.begin(); itr!=_sizedAdditiveLightPointList.end(); ++itr) { @@ -65,7 +66,7 @@ void LightPointDrawable::reset() itr->erase(itr->begin(),itr->end()); } - for(SizedLightPointList::iterator itr=_sizedBlendedLightPointList.begin(); + for(itr=_sizedBlendedLightPointList.begin(); itr!=_sizedBlendedLightPointList.end(); ++itr) {