From efc7ff6b02e8fba7eb277f52483bf62f8d97784c Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 4 Sep 2007 09:00:38 +0000 Subject: [PATCH] Rearrange _stateset member variable to avoid compile warning --- include/osgUtil/StateGraph | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/include/osgUtil/StateGraph b/include/osgUtil/StateGraph index 2afe6aadd..5d7fc6e73 100644 --- a/include/osgUtil/StateGraph +++ b/include/osgUtil/StateGraph @@ -48,6 +48,12 @@ class OSGUTIL_EXPORT StateGraph : public osg::Referenced StateGraph* _parent; +#ifdef OSGUTIL_RENDERBACKEND_USE_REF_PTR + osg::ref_ptr _stateset; +#else + const osg::StateSet* _stateset; +#endif + int _depth; ChildList _children; LeafList _leaves; @@ -96,11 +102,9 @@ class OSGUTIL_EXPORT StateGraph : public osg::Referenced const osg::Referenced* getUserData() const { return _userData.get(); } #ifdef OSGUTIL_RENDERBACKEND_USE_REF_PTR - osg::ref_ptr _stateset; const osg::StateSet* getStateSet() const { return _stateset.get(); } #else - const osg::StateSet* _stateset; - const osg::StateSet* getStateSet() const { return _stateset.get(); } + const osg::StateSet* getStateSet() const { return _stateset; } #endif /** return true if all of drawables, lights and children are empty.*/