Fixed build warnings on MSVC14 x64 in the X3D format sources.
This commit is contained in:
@@ -253,7 +253,7 @@ void X3DImporter::Postprocess_BuildMesh(const CX3DImporter_NodeElement& pNodeEle
|
||||
|
||||
tarr.reserve(tnemesh.Vertices.size());
|
||||
for(std::list<aiVector3D>::iterator it = tnemesh.Vertices.begin(); it != tnemesh.Vertices.end(); it++) tarr.push_back(*it);
|
||||
*pMesh = StandardShapes::MakeMesh(tarr, tnemesh.NumIndices);// create mesh from vertices using Assimp help.
|
||||
*pMesh = StandardShapes::MakeMesh(tarr, static_cast<unsigned int>(tnemesh.NumIndices));// create mesh from vertices using Assimp help.
|
||||
|
||||
return;// mesh is build, nothing to do anymore.
|
||||
}
|
||||
@@ -272,7 +272,7 @@ void X3DImporter::Postprocess_BuildMesh(const CX3DImporter_NodeElement& pNodeEle
|
||||
tarr.reserve(tnemesh.Vertices.size());
|
||||
for(std::list<aiVector3D>::iterator it = tnemesh.Vertices.begin(); it != tnemesh.Vertices.end(); it++) tarr.push_back(*it);
|
||||
|
||||
*pMesh = StandardShapes::MakeMesh(tarr, tnemesh.NumIndices);// create mesh from vertices using Assimp help.
|
||||
*pMesh = StandardShapes::MakeMesh(tarr, static_cast<unsigned int>(tnemesh.NumIndices));// create mesh from vertices using Assimp help.
|
||||
|
||||
return;// mesh is build, nothing to do anymore.
|
||||
}
|
||||
@@ -669,7 +669,7 @@ void X3DImporter::Postprocess_BuildNode(const CX3DImporter_NodeElement& pNodeEle
|
||||
{
|
||||
std::list<aiNode*>::const_iterator it = SceneNode_Child.begin();
|
||||
|
||||
pSceneNode.mNumChildren = SceneNode_Child.size();
|
||||
pSceneNode.mNumChildren = static_cast<unsigned int>(SceneNode_Child.size());
|
||||
pSceneNode.mChildren = new aiNode*[pSceneNode.mNumChildren];
|
||||
for(size_t i = 0; i < pSceneNode.mNumChildren; i++) pSceneNode.mChildren[i] = *it++;
|
||||
}
|
||||
@@ -678,7 +678,7 @@ void X3DImporter::Postprocess_BuildNode(const CX3DImporter_NodeElement& pNodeEle
|
||||
{
|
||||
std::list<unsigned int>::const_iterator it = SceneNode_Mesh.begin();
|
||||
|
||||
pSceneNode.mNumMeshes = SceneNode_Mesh.size();
|
||||
pSceneNode.mNumMeshes = static_cast<unsigned int>(SceneNode_Mesh.size());
|
||||
pSceneNode.mMeshes = new unsigned int[pSceneNode.mNumMeshes];
|
||||
for(size_t i = 0; i < pSceneNode.mNumMeshes; i++) pSceneNode.mMeshes[i] = *it++;
|
||||
}
|
||||
@@ -702,7 +702,7 @@ void X3DImporter::Postprocess_BuildShape(const CX3DImporter_NodeElement_Shape& p
|
||||
if(tmesh != nullptr)
|
||||
{
|
||||
// if mesh successfully built then add data about it to arrays
|
||||
pNodeMeshInd.push_back(pSceneMeshList.size());
|
||||
pNodeMeshInd.push_back(static_cast<unsigned int>(pSceneMeshList.size()));
|
||||
pSceneMeshList.push_back(tmesh);
|
||||
// keep mesh type. Need above for texture coordinate generation.
|
||||
mesh_type = (*it)->Type;
|
||||
@@ -714,7 +714,7 @@ void X3DImporter::Postprocess_BuildShape(const CX3DImporter_NodeElement_Shape& p
|
||||
if(tmat != nullptr)
|
||||
{
|
||||
// if material successfully built then add data about it to array
|
||||
mat_ind = pSceneMaterialList.size();
|
||||
mat_ind = static_cast<unsigned int>(pSceneMaterialList.size());
|
||||
pSceneMaterialList.push_back(tmat);
|
||||
}
|
||||
}
|
||||
@@ -765,7 +765,7 @@ void X3DImporter::Postprocess_CollectMetadata(const CX3DImporter_NodeElement& pN
|
||||
}
|
||||
|
||||
// copy collected metadata to output node.
|
||||
pSceneNode.mMetaData = aiMetadata::Alloc( meta_list.size() );
|
||||
pSceneNode.mMetaData = aiMetadata::Alloc( static_cast<unsigned int>(meta_list.size()) );
|
||||
meta_idx = 0;
|
||||
for(std::list<CX3DImporter_NodeElement*>::const_iterator it = meta_list.begin(); it != meta_list.end(); it++, meta_idx++)
|
||||
{
|
||||
@@ -776,22 +776,22 @@ void X3DImporter::Postprocess_CollectMetadata(const CX3DImporter_NodeElement& pN
|
||||
if((*it)->Type == CX3DImporter_NodeElement::ENET_MetaBoolean)
|
||||
{
|
||||
if(((CX3DImporter_NodeElement_MetaBoolean*)cur_meta)->Value.size() > 0)
|
||||
pSceneNode.mMetaData->Set(meta_idx, cur_meta->Name, *(((CX3DImporter_NodeElement_MetaBoolean*)cur_meta)->Value.begin()));
|
||||
pSceneNode.mMetaData->Set(static_cast<unsigned int>(meta_idx), cur_meta->Name, *(((CX3DImporter_NodeElement_MetaBoolean*)cur_meta)->Value.begin()));
|
||||
}
|
||||
else if((*it)->Type == CX3DImporter_NodeElement::ENET_MetaDouble)
|
||||
{
|
||||
if(((CX3DImporter_NodeElement_MetaDouble*)cur_meta)->Value.size() > 0)
|
||||
pSceneNode.mMetaData->Set(meta_idx, cur_meta->Name, (float)*(((CX3DImporter_NodeElement_MetaDouble*)cur_meta)->Value.begin()));
|
||||
pSceneNode.mMetaData->Set(static_cast<unsigned int>(meta_idx), cur_meta->Name, (float)*(((CX3DImporter_NodeElement_MetaDouble*)cur_meta)->Value.begin()));
|
||||
}
|
||||
else if((*it)->Type == CX3DImporter_NodeElement::ENET_MetaFloat)
|
||||
{
|
||||
if(((CX3DImporter_NodeElement_MetaFloat*)cur_meta)->Value.size() > 0)
|
||||
pSceneNode.mMetaData->Set(meta_idx, cur_meta->Name, *(((CX3DImporter_NodeElement_MetaFloat*)cur_meta)->Value.begin()));
|
||||
pSceneNode.mMetaData->Set(static_cast<unsigned int>(meta_idx), cur_meta->Name, *(((CX3DImporter_NodeElement_MetaFloat*)cur_meta)->Value.begin()));
|
||||
}
|
||||
else if((*it)->Type == CX3DImporter_NodeElement::ENET_MetaInteger)
|
||||
{
|
||||
if(((CX3DImporter_NodeElement_MetaInteger*)cur_meta)->Value.size() > 0)
|
||||
pSceneNode.mMetaData->Set(meta_idx, cur_meta->Name, *(((CX3DImporter_NodeElement_MetaInteger*)cur_meta)->Value.begin()));
|
||||
pSceneNode.mMetaData->Set(static_cast<unsigned int>(meta_idx), cur_meta->Name, *(((CX3DImporter_NodeElement_MetaInteger*)cur_meta)->Value.begin()));
|
||||
}
|
||||
else if((*it)->Type == CX3DImporter_NodeElement::ENET_MetaString)
|
||||
{
|
||||
@@ -799,7 +799,7 @@ void X3DImporter::Postprocess_CollectMetadata(const CX3DImporter_NodeElement& pN
|
||||
{
|
||||
aiString tstr(((CX3DImporter_NodeElement_MetaString*)cur_meta)->Value.begin()->data());
|
||||
|
||||
pSceneNode.mMetaData->Set(meta_idx, cur_meta->Name, tstr);
|
||||
pSceneNode.mMetaData->Set(static_cast<unsigned int>(meta_idx), cur_meta->Name, tstr);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user