From e345a7bacd8b9137fa650fe0fd69fb930e11b902 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 26 Apr 2011 19:31:04 +0000 Subject: [PATCH] Fixed 1 Coverity Low Impact issue "Unused pointer value (UNUSED_VALUE) Pointer "indices" returned by "this->_vertexAttribList[0ULL].indices.get()" is never used." Report highlighted the fact that later code wasn't using the indices variable when it should have been, so potentially a higher impact that the severity suggested by Coverity. --- src/osg/Geometry.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/osg/Geometry.cpp b/src/osg/Geometry.cpp index 3842a7c1b..f16f20343 100644 --- a/src/osg/Geometry.cpp +++ b/src/osg/Geometry.cpp @@ -1764,7 +1764,7 @@ void Geometry::accept(PrimitiveIndexFunctor& functor) const return; } - if (!_vertexData.indices.valid()) + if (!indices) { for(PrimitiveSetList::const_iterator itr=_primitives.begin(); itr!=_primitives.end(); @@ -1793,7 +1793,7 @@ void Geometry::accept(PrimitiveIndexFunctor& functor) const vindexindex(vindex)); + functor.vertex(indices->index(vindex)); } functor.end(); @@ -1813,7 +1813,7 @@ void Geometry::accept(PrimitiveIndexFunctor& functor) const for(GLsizei primCount=0;primCount<*primItr;++primCount) { - functor.vertex(_vertexData.indices->index(vindex)); + functor.vertex(indices->index(vindex)); ++vindex; } @@ -1833,7 +1833,7 @@ void Geometry::accept(PrimitiveIndexFunctor& functor) const ++primCount,++primItr) { unsigned int vindex=*primItr; - functor.vertex(_vertexData.indices->index(vindex)); + functor.vertex(indices->index(vindex)); } functor.end(); @@ -1849,7 +1849,7 @@ void Geometry::accept(PrimitiveIndexFunctor& functor) const ++primItr) { unsigned int vindex=*primItr; - functor.vertex(_vertexData.indices->index(vindex)); + functor.vertex(indices->index(vindex)); } functor.end(); @@ -1865,7 +1865,7 @@ void Geometry::accept(PrimitiveIndexFunctor& functor) const ++primItr) { unsigned int vindex=*primItr; - functor.vertex(_vertexData.indices->index(vindex)); + functor.vertex(indices->index(vindex)); } functor.end();