X3DImporter: Add assertions to silence static analyzer warnings
parent
66c18cc406
commit
f475803f93
|
@ -48,6 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "X3DImporter.hpp"
|
||||
|
||||
// Header files, Assimp.
|
||||
#include <assimp/ai_assert.h>
|
||||
#include "StandardShapes.h"
|
||||
#include "StringUtils.h"
|
||||
|
||||
|
@ -357,6 +358,7 @@ void X3DImporter::Postprocess_BuildMesh(const CX3DImporter_NodeElement& pNodeEle
|
|||
// copy additional information from children
|
||||
for(std::list<CX3DImporter_NodeElement*>::iterator ch_it = tnemesh.Child.begin(); ch_it != tnemesh.Child.end(); ch_it++)
|
||||
{
|
||||
ai_assert(*pMesh);
|
||||
if((*ch_it)->Type == CX3DImporter_NodeElement::ENET_Color)
|
||||
MeshGeometry_AddColor(**pMesh, tnemesh.CoordIndex, tnemesh.ColorIndex, ((CX3DImporter_NodeElement_Color*)*ch_it)->Value, tnemesh.ColorPerVertex);
|
||||
else if((*ch_it)->Type == CX3DImporter_NodeElement::ENET_ColorRGBA)
|
||||
|
@ -389,6 +391,7 @@ void X3DImporter::Postprocess_BuildMesh(const CX3DImporter_NodeElement& pNodeEle
|
|||
// copy additional information from children
|
||||
for(std::list<CX3DImporter_NodeElement*>::iterator ch_it = tnemesh.Child.begin(); ch_it != tnemesh.Child.end(); ch_it++)
|
||||
{
|
||||
ai_assert(*pMesh);
|
||||
if((*ch_it)->Type == CX3DImporter_NodeElement::ENET_Color)
|
||||
MeshGeometry_AddColor(**pMesh, tnemesh.CoordIndex, tnemesh.ColorIndex, ((CX3DImporter_NodeElement_Color*)*ch_it)->Value, tnemesh.ColorPerVertex);
|
||||
else if((*ch_it)->Type == CX3DImporter_NodeElement::ENET_ColorRGBA)
|
||||
|
@ -446,6 +449,7 @@ void X3DImporter::Postprocess_BuildMesh(const CX3DImporter_NodeElement& pNodeEle
|
|||
// copy additional information from children
|
||||
for(std::list<CX3DImporter_NodeElement*>::iterator ch_it = tnemesh.Child.begin(); ch_it != tnemesh.Child.end(); ch_it++)
|
||||
{
|
||||
ai_assert(*pMesh);
|
||||
if((*ch_it)->Type == CX3DImporter_NodeElement::ENET_Color)
|
||||
MeshGeometry_AddColor(**pMesh, ((CX3DImporter_NodeElement_Color*)*ch_it)->Value, true);
|
||||
else if((*ch_it)->Type == CX3DImporter_NodeElement::ENET_ColorRGBA)
|
||||
|
@ -475,6 +479,7 @@ void X3DImporter::Postprocess_BuildMesh(const CX3DImporter_NodeElement& pNodeEle
|
|||
// copy additional information from children
|
||||
for(std::list<CX3DImporter_NodeElement*>::iterator ch_it = tnemesh.Child.begin(); ch_it != tnemesh.Child.end(); ch_it++)
|
||||
{
|
||||
ai_assert(*pMesh);
|
||||
if((*ch_it)->Type == CX3DImporter_NodeElement::ENET_Color)
|
||||
MeshGeometry_AddColor(**pMesh, ((CX3DImporter_NodeElement_Color*)*ch_it)->Value, true);
|
||||
else if((*ch_it)->Type == CX3DImporter_NodeElement::ENET_ColorRGBA)
|
||||
|
@ -550,6 +555,7 @@ void X3DImporter::Postprocess_BuildMesh(const CX3DImporter_NodeElement& pNodeEle
|
|||
// copy additional information from children
|
||||
for(std::list<CX3DImporter_NodeElement*>::iterator ch_it = tnemesh.Child.begin(); ch_it != tnemesh.Child.end(); ch_it++)
|
||||
{
|
||||
ai_assert(*pMesh);
|
||||
if((*ch_it)->Type == CX3DImporter_NodeElement::ENET_Color)
|
||||
MeshGeometry_AddColor(**pMesh, ((CX3DImporter_NodeElement_Color*)*ch_it)->Value, tnemesh.ColorPerVertex);
|
||||
else if((*ch_it)->Type == CX3DImporter_NodeElement::ENET_ColorRGBA)
|
||||
|
@ -584,6 +590,7 @@ void X3DImporter::Postprocess_BuildMesh(const CX3DImporter_NodeElement& pNodeEle
|
|||
// copy additional information from children
|
||||
for(std::list<CX3DImporter_NodeElement*>::iterator ch_it = tnemesh.Child.begin(); ch_it != tnemesh.Child.end(); ch_it++)
|
||||
{
|
||||
ai_assert(*pMesh);
|
||||
if((*ch_it)->Type == CX3DImporter_NodeElement::ENET_Color)
|
||||
MeshGeometry_AddColor(**pMesh, ((CX3DImporter_NodeElement_Color*)*ch_it)->Value, tnemesh.ColorPerVertex);
|
||||
else if((*ch_it)->Type == CX3DImporter_NodeElement::ENET_ColorRGBA)
|
||||
|
|
Loading…
Reference in New Issue