const aiString *find = newMeshes[b].second?&newMeshes[b].second->mName:0;
aiNode *theNode = find?pScene->mRootNode->FindNode(*find):0;
- std::pair<unsigned int,aiNode*> push_pair(meshes.size(),theNode);
+ std::pair<unsigned int,aiNode*> push_pair(static_cast<unsigned int>(meshes.size()),theNode);
mSubMeshIndices[a].push_back(push_pair);
meshes.push_back(newMeshes[b].first);
}
else {
// Mesh is kept unchanged - store it's new place in the mesh array
- mSubMeshIndices[a].push_back(std::pair<unsigned int,aiNode*>(meshes.size(),(aiNode*)0));
+ mSubMeshIndices[a].push_back(std::pair<unsigned int,aiNode*>(static_cast<unsigned int>(meshes.size()),(aiNode*)0));
meshes.push_back(srcMesh);
}
}
// rebuild the scene's mesh array
- pScene->mNumMeshes = meshes.size();
+ pScene->mNumMeshes = static_cast<unsigned int>(meshes.size());
delete [] pScene->mMeshes;
pScene->mMeshes = new aiMesh*[pScene->mNumMeshes];
std::copy( meshes.begin(), meshes.end(), pScene->mMeshes);
// this will require two passes
- unsigned int m = pNode->mNumMeshes, n = mSubMeshIndices.size();
+ unsigned int m = static_cast<unsigned int>(pNode->mNumMeshes), n = static_cast<unsigned int>(mSubMeshIndices.size());
// first pass, look for meshes which have not moved
unsigned int srcIndex = pNode->mMeshes[a];
const std::vector< std::pair< unsigned int,aiNode* > > &subMeshes = mSubMeshIndices[srcIndex];
- unsigned int nSubmeshes = subMeshes.size();
+ unsigned int nSubmeshes = static_cast<unsigned int>(subMeshes.size());
for(unsigned int b=0;b<nSubmeshes;b++) {
if(!subMeshes[b].second) {
for(unsigned int a=0;a<n;a++)
{
const std::vector< std::pair< unsigned int,aiNode* > > &subMeshes = mSubMeshIndices[a];
- unsigned int nSubmeshes = subMeshes.size();
+ unsigned int nSubmeshes = static_cast<unsigned int>(subMeshes.size());
for(unsigned int b=0;b<nSubmeshes;b++) {
if(subMeshes[b].second == pNode) {
delete [] pNode->mMeshes; pNode->mMeshes = NULL;
}
- pNode->mNumMeshes = newMeshList.size();
+ pNode->mNumMeshes = static_cast<unsigned int>(newMeshList.size());
if(pNode->mNumMeshes) {
pNode->mMeshes = new unsigned int[pNode->mNumMeshes];