Fixes gles coverity defects

This commit is contained in:
Marc Helbling
2016-07-05 16:32:00 +02:00
parent ab69edb506
commit 6fd972fa42
16 changed files with 219 additions and 178 deletions

View File

@@ -1,3 +1,5 @@
/* -*-c++-*- OpenSceneGraph - Copyright (C) Sketchfab */
#ifndef SUB_GEOMETRY
#define SUB_GEOMETRY
@@ -49,11 +51,14 @@ public:
if(const osgAnimation::MorphGeometry* morphSource = dynamic_cast<const osgAnimation::MorphGeometry*>(&source)) {
osgAnimation::MorphGeometry* morph = dynamic_cast<osgAnimation::MorphGeometry*>(_geometry.get());
const osgAnimation::MorphGeometry::MorphTargetList& morphTargetList = morphSource->getMorphTargetList();
for(osgAnimation::MorphGeometry::MorphTargetList::const_iterator targetSource = morphTargetList.begin() ;
targetSource != morphTargetList.end() ; ++ targetSource) {
osg::Geometry* target = new osg::Geometry;
addSourceBuffers(target, *targetSource->getGeometry());
morph->addMorphTarget(target, targetSource->getWeight());
osgAnimation::MorphGeometry::MorphTargetList::const_iterator targetSource;
for(targetSource = morphTargetList.begin() ; targetSource != morphTargetList.end() ; ++ targetSource) {
if(targetSource->getGeometry()) {
osg::Geometry* target = new osg::Geometry;
addSourceBuffers(target, *targetSource->getGeometry());
morph->addMorphTarget(target, targetSource->getWeight());
}
}
}