diff --git a/code/IRRLoader.cpp b/code/IRRLoader.cpp index 6e2a9a5b5..1056893f5 100644 --- a/code/IRRLoader.cpp +++ b/code/IRRLoader.cpp @@ -215,7 +215,7 @@ void IRRImporter::BuildSkybox(std::vector& meshes, std::vectormMaterialIndex = materials.size()-6u; + meshes.back()->mMaterialIndex = static_cast(materials.size()-6u); // LEFT SIDE meshes.push_back( BuildSingleQuadMesh( @@ -223,7 +223,7 @@ void IRRImporter::BuildSkybox(std::vector& meshes, std::vectormMaterialIndex = materials.size()-5u; + meshes.back()->mMaterialIndex = static_cast(materials.size()-5u); // BACK SIDE meshes.push_back( BuildSingleQuadMesh( @@ -231,7 +231,7 @@ void IRRImporter::BuildSkybox(std::vector& meshes, std::vectormMaterialIndex = materials.size()-4u; + meshes.back()->mMaterialIndex = static_cast(materials.size()-4u); // RIGHT SIDE meshes.push_back( BuildSingleQuadMesh( @@ -239,7 +239,7 @@ void IRRImporter::BuildSkybox(std::vector& meshes, std::vectormMaterialIndex = materials.size()-3u; + meshes.back()->mMaterialIndex = static_cast(materials.size()-3u); // TOP SIDE meshes.push_back( BuildSingleQuadMesh( @@ -247,7 +247,7 @@ void IRRImporter::BuildSkybox(std::vector& meshes, std::vectormMaterialIndex = materials.size()-2u; + meshes.back()->mMaterialIndex = static_cast(materials.size()-2u); // BOTTOM SIDE meshes.push_back( BuildSingleQuadMesh( @@ -255,7 +255,7 @@ void IRRImporter::BuildSkybox(std::vector& meshes, std::vectormMaterialIndex = materials.size()-1u; + meshes.back()->mMaterialIndex = static_cast(materials.size()-1u); } // ------------------------------------------------------------------------------------------------ @@ -641,7 +641,7 @@ void SetupMapping (aiMaterial* mat, aiTextureMapping mode, const aiVector3D& axi delete[] mat->mProperties; mat->mProperties = new aiMaterialProperty*[p.size()*2]; - mat->mNumAllocated = p.size()*2; + mat->mNumAllocated = static_cast(p.size()*2); } mat->mNumProperties = (unsigned int)p.size(); ::memcpy(mat->mProperties,&p[0],sizeof(void*)*mat->mNumProperties); diff --git a/code/irrXMLWrapper.h b/code/irrXMLWrapper.h index 41e418811..5b47faefe 100644 --- a/code/irrXMLWrapper.h +++ b/code/irrXMLWrapper.h @@ -92,7 +92,7 @@ public: // Remove null characters from the input sequence otherwise the parsing will utterly fail unsigned int size = 0; - unsigned int size_max = data.size(); + unsigned int size_max = static_cast(data.size()); for(unsigned int i = 0; i < size_max; i++) { if(data[i] != '\0') { data[size++] = data[i]; @@ -117,7 +117,7 @@ public: return 0; } if(t+sizeToRead>data.size()) { - sizeToRead = data.size()-t; + sizeToRead = static_cast(data.size()-t); } memcpy(buffer,&data.front()+t,sizeToRead);