Fixed build warnings on MSVC14 x64 in the write dumb source.
parent
f22d78a3d3
commit
dc3f265803
|
@ -292,14 +292,14 @@ uint32_t WriteBinaryTexture(const aiTexture* tex)
|
||||||
|
|
||||||
len += Write<unsigned int>(tex->mWidth);
|
len += Write<unsigned int>(tex->mWidth);
|
||||||
len += Write<unsigned int>(tex->mHeight);
|
len += Write<unsigned int>(tex->mHeight);
|
||||||
len += fwrite(tex->achFormatHint,1,4,out);
|
len += static_cast<uint32_t>(fwrite(tex->achFormatHint,1,4,out));
|
||||||
|
|
||||||
if(!shortened) {
|
if(!shortened) {
|
||||||
if (!tex->mHeight) {
|
if (!tex->mHeight) {
|
||||||
len += fwrite(tex->pcData,1,tex->mWidth,out);
|
len += static_cast<uint32_t>(fwrite(tex->pcData,1,tex->mWidth,out));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
len += fwrite(tex->pcData,1,tex->mWidth*tex->mHeight*4,out);
|
len += static_cast<uint32_t>(fwrite(tex->pcData,1,tex->mWidth*tex->mHeight*4,out));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -321,7 +321,7 @@ uint32_t WriteBinaryBone(const aiBone* b)
|
||||||
if (shortened) {
|
if (shortened) {
|
||||||
len += WriteBounds(b->mWeights,b->mNumWeights);
|
len += WriteBounds(b->mWeights,b->mNumWeights);
|
||||||
} // else write as usual
|
} // else write as usual
|
||||||
else len += fwrite(b->mWeights,1,b->mNumWeights*sizeof(aiVertexWeight),out);
|
else len += static_cast<uint32_t>(fwrite(b->mWeights,1,b->mNumWeights*sizeof(aiVertexWeight),out));
|
||||||
|
|
||||||
ChangeInteger(old,len);
|
ChangeInteger(old,len);
|
||||||
return len;
|
return len;
|
||||||
|
@ -368,13 +368,13 @@ uint32_t WriteBinaryMesh(const aiMesh* mesh)
|
||||||
if (shortened) {
|
if (shortened) {
|
||||||
len += WriteBounds(mesh->mVertices,mesh->mNumVertices);
|
len += WriteBounds(mesh->mVertices,mesh->mNumVertices);
|
||||||
} // else write as usual
|
} // else write as usual
|
||||||
else len += fwrite(mesh->mVertices,1,12*mesh->mNumVertices,out);
|
else len += static_cast<uint32_t>(fwrite(mesh->mVertices,1,12*mesh->mNumVertices,out));
|
||||||
}
|
}
|
||||||
if (mesh->mNormals) {
|
if (mesh->mNormals) {
|
||||||
if (shortened) {
|
if (shortened) {
|
||||||
len += WriteBounds(mesh->mNormals,mesh->mNumVertices);
|
len += WriteBounds(mesh->mNormals,mesh->mNumVertices);
|
||||||
} // else write as usual
|
} // else write as usual
|
||||||
else len += fwrite(mesh->mNormals,1,12*mesh->mNumVertices,out);
|
else len += static_cast<uint32_t>(fwrite(mesh->mNormals,1,12*mesh->mNumVertices,out));
|
||||||
}
|
}
|
||||||
if (mesh->mTangents && mesh->mBitangents) {
|
if (mesh->mTangents && mesh->mBitangents) {
|
||||||
if (shortened) {
|
if (shortened) {
|
||||||
|
@ -382,8 +382,8 @@ uint32_t WriteBinaryMesh(const aiMesh* mesh)
|
||||||
len += WriteBounds(mesh->mBitangents,mesh->mNumVertices);
|
len += WriteBounds(mesh->mBitangents,mesh->mNumVertices);
|
||||||
} // else write as usual
|
} // else write as usual
|
||||||
else {
|
else {
|
||||||
len += fwrite(mesh->mTangents,1,12*mesh->mNumVertices,out);
|
len += static_cast<uint32_t>(fwrite(mesh->mTangents,1,12*mesh->mNumVertices,out));
|
||||||
len += fwrite(mesh->mBitangents,1,12*mesh->mNumVertices,out);
|
len += static_cast<uint32_t>(fwrite(mesh->mBitangents,1,12*mesh->mNumVertices,out));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (unsigned int n = 0; n < AI_MAX_NUMBER_OF_COLOR_SETS;++n) {
|
for (unsigned int n = 0; n < AI_MAX_NUMBER_OF_COLOR_SETS;++n) {
|
||||||
|
@ -393,7 +393,7 @@ uint32_t WriteBinaryMesh(const aiMesh* mesh)
|
||||||
if (shortened) {
|
if (shortened) {
|
||||||
len += WriteBounds(mesh->mColors[n],mesh->mNumVertices);
|
len += WriteBounds(mesh->mColors[n],mesh->mNumVertices);
|
||||||
} // else write as usual
|
} // else write as usual
|
||||||
else len += fwrite(mesh->mColors[n],16*mesh->mNumVertices,1,out);
|
else len += static_cast<uint32_t>(fwrite(mesh->mColors[n],16*mesh->mNumVertices,1,out));
|
||||||
}
|
}
|
||||||
for (unsigned int n = 0; n < AI_MAX_NUMBER_OF_TEXTURECOORDS;++n) {
|
for (unsigned int n = 0; n < AI_MAX_NUMBER_OF_TEXTURECOORDS;++n) {
|
||||||
if (!mesh->mTextureCoords[n])
|
if (!mesh->mTextureCoords[n])
|
||||||
|
@ -405,7 +405,7 @@ uint32_t WriteBinaryMesh(const aiMesh* mesh)
|
||||||
if (shortened) {
|
if (shortened) {
|
||||||
len += WriteBounds(mesh->mTextureCoords[n],mesh->mNumVertices);
|
len += WriteBounds(mesh->mTextureCoords[n],mesh->mNumVertices);
|
||||||
} // else write as usual
|
} // else write as usual
|
||||||
else len += fwrite(mesh->mTextureCoords[n],12*mesh->mNumVertices,1,out);
|
else len += static_cast<uint32_t>(fwrite(mesh->mTextureCoords[n],12*mesh->mNumVertices,1,out));
|
||||||
}
|
}
|
||||||
|
|
||||||
// write faces. There are no floating-point calculations involved
|
// write faces. There are no floating-point calculations involved
|
||||||
|
@ -472,7 +472,7 @@ uint32_t WriteBinaryMaterialProperty(const aiMaterialProperty* prop)
|
||||||
|
|
||||||
len += Write<unsigned int>(prop->mDataLength);
|
len += Write<unsigned int>(prop->mDataLength);
|
||||||
len += Write<unsigned int>((unsigned int)prop->mType);
|
len += Write<unsigned int>((unsigned int)prop->mType);
|
||||||
len += fwrite(prop->mData,1,prop->mDataLength,out);
|
len += static_cast<uint32_t>(fwrite(prop->mData,1,prop->mDataLength,out));
|
||||||
|
|
||||||
ChangeInteger(old,len);
|
ChangeInteger(old,len);
|
||||||
return len;
|
return len;
|
||||||
|
@ -509,21 +509,21 @@ uint32_t WriteBinaryNodeAnim(const aiNodeAnim* nd)
|
||||||
len += WriteBounds(nd->mPositionKeys,nd->mNumPositionKeys);
|
len += WriteBounds(nd->mPositionKeys,nd->mNumPositionKeys);
|
||||||
|
|
||||||
} // else write as usual
|
} // else write as usual
|
||||||
else len += fwrite(nd->mPositionKeys,1,nd->mNumPositionKeys*sizeof(aiVectorKey),out);
|
else len += static_cast<uint32_t>(fwrite(nd->mPositionKeys,1,nd->mNumPositionKeys*sizeof(aiVectorKey),out));
|
||||||
}
|
}
|
||||||
if (nd->mRotationKeys) {
|
if (nd->mRotationKeys) {
|
||||||
if (shortened) {
|
if (shortened) {
|
||||||
len += WriteBounds(nd->mRotationKeys,nd->mNumRotationKeys);
|
len += WriteBounds(nd->mRotationKeys,nd->mNumRotationKeys);
|
||||||
|
|
||||||
} // else write as usual
|
} // else write as usual
|
||||||
else len += fwrite(nd->mRotationKeys,1,nd->mNumRotationKeys*sizeof(aiQuatKey),out);
|
else len += static_cast<uint32_t>(fwrite(nd->mRotationKeys,1,nd->mNumRotationKeys*sizeof(aiQuatKey),out));
|
||||||
}
|
}
|
||||||
if (nd->mScalingKeys) {
|
if (nd->mScalingKeys) {
|
||||||
if (shortened) {
|
if (shortened) {
|
||||||
len += WriteBounds(nd->mScalingKeys,nd->mNumScalingKeys);
|
len += WriteBounds(nd->mScalingKeys,nd->mNumScalingKeys);
|
||||||
|
|
||||||
} // else write as usual
|
} // else write as usual
|
||||||
else len += fwrite(nd->mScalingKeys,1,nd->mNumScalingKeys*sizeof(aiVectorKey),out);
|
else len += static_cast<uint32_t>(fwrite(nd->mScalingKeys,1,nd->mNumScalingKeys*sizeof(aiVectorKey),out));
|
||||||
}
|
}
|
||||||
|
|
||||||
ChangeInteger(old,len);
|
ChangeInteger(old,len);
|
||||||
|
|
Loading…
Reference in New Issue