Fixed build warnings on MSVC14 x64 in the IRR format sources.
parent
c7efb50ad1
commit
1e2c0279b0
|
@ -215,7 +215,7 @@ void IRRImporter::BuildSkybox(std::vector<aiMesh*>& meshes, std::vector<aiMateri
|
|||
SkyboxVertex( l,-l,-l, 0, 0, 1, 0.0,1.0),
|
||||
SkyboxVertex( l, l,-l, 0, 0, 1, 0.0,0.0),
|
||||
SkyboxVertex(-l, l,-l, 0, 0, 1, 1.0,0.0)) );
|
||||
meshes.back()->mMaterialIndex = materials.size()-6u;
|
||||
meshes.back()->mMaterialIndex = static_cast<unsigned int>(materials.size()-6u);
|
||||
|
||||
// LEFT SIDE
|
||||
meshes.push_back( BuildSingleQuadMesh(
|
||||
|
@ -223,7 +223,7 @@ void IRRImporter::BuildSkybox(std::vector<aiMesh*>& meshes, std::vector<aiMateri
|
|||
SkyboxVertex( l,-l, l, -1, 0, 0, 0.0,1.0),
|
||||
SkyboxVertex( l, l, l, -1, 0, 0, 0.0,0.0),
|
||||
SkyboxVertex( l, l,-l, -1, 0, 0, 1.0,0.0)) );
|
||||
meshes.back()->mMaterialIndex = materials.size()-5u;
|
||||
meshes.back()->mMaterialIndex = static_cast<unsigned int>(materials.size()-5u);
|
||||
|
||||
// BACK SIDE
|
||||
meshes.push_back( BuildSingleQuadMesh(
|
||||
|
@ -231,7 +231,7 @@ void IRRImporter::BuildSkybox(std::vector<aiMesh*>& meshes, std::vector<aiMateri
|
|||
SkyboxVertex(-l,-l, l, 0, 0, -1, 0.0,1.0),
|
||||
SkyboxVertex(-l, l, l, 0, 0, -1, 0.0,0.0),
|
||||
SkyboxVertex( l, l, l, 0, 0, -1, 1.0,0.0)) );
|
||||
meshes.back()->mMaterialIndex = materials.size()-4u;
|
||||
meshes.back()->mMaterialIndex = static_cast<unsigned int>(materials.size()-4u);
|
||||
|
||||
// RIGHT SIDE
|
||||
meshes.push_back( BuildSingleQuadMesh(
|
||||
|
@ -239,7 +239,7 @@ void IRRImporter::BuildSkybox(std::vector<aiMesh*>& meshes, std::vector<aiMateri
|
|||
SkyboxVertex(-l,-l,-l, 1, 0, 0, 0.0,1.0),
|
||||
SkyboxVertex(-l, l,-l, 1, 0, 0, 0.0,0.0),
|
||||
SkyboxVertex(-l, l, l, 1, 0, 0, 1.0,0.0)) );
|
||||
meshes.back()->mMaterialIndex = materials.size()-3u;
|
||||
meshes.back()->mMaterialIndex = static_cast<unsigned int>(materials.size()-3u);
|
||||
|
||||
// TOP SIDE
|
||||
meshes.push_back( BuildSingleQuadMesh(
|
||||
|
@ -247,7 +247,7 @@ void IRRImporter::BuildSkybox(std::vector<aiMesh*>& meshes, std::vector<aiMateri
|
|||
SkyboxVertex( l, l, l, 0, -1, 0, 0.0,1.0),
|
||||
SkyboxVertex(-l, l, l, 0, -1, 0, 0.0,0.0),
|
||||
SkyboxVertex(-l, l,-l, 0, -1, 0, 1.0,0.0)) );
|
||||
meshes.back()->mMaterialIndex = materials.size()-2u;
|
||||
meshes.back()->mMaterialIndex = static_cast<unsigned int>(materials.size()-2u);
|
||||
|
||||
// BOTTOM SIDE
|
||||
meshes.push_back( BuildSingleQuadMesh(
|
||||
|
@ -255,7 +255,7 @@ void IRRImporter::BuildSkybox(std::vector<aiMesh*>& meshes, std::vector<aiMateri
|
|||
SkyboxVertex( l,-l,-l, 0, 1, 0, 1.0,0.0),
|
||||
SkyboxVertex(-l,-l,-l, 0, 1, 0, 1.0,1.0),
|
||||
SkyboxVertex(-l,-l, l, 0, 1, 0, 0.0,1.0)) );
|
||||
meshes.back()->mMaterialIndex = materials.size()-1u;
|
||||
meshes.back()->mMaterialIndex = static_cast<unsigned int>(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<unsigned int>(p.size()*2);
|
||||
}
|
||||
mat->mNumProperties = (unsigned int)p.size();
|
||||
::memcpy(mat->mProperties,&p[0],sizeof(void*)*mat->mNumProperties);
|
||||
|
|
|
@ -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<unsigned int>(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<int>(data.size()-t);
|
||||
}
|
||||
|
||||
memcpy(buffer,&data.front()+t,sizeToRead);
|
||||
|
|
Loading…
Reference in New Issue