Fix implicit conversion errors on macOS
parent
4950d02bac
commit
e4386d3013
|
@ -975,7 +975,7 @@ void MDLImporter::CalcAbsBoneMatrices_3DGS_MDL7(MDL::IntBone_MDL7 **apcOutBones)
|
||||||
}
|
}
|
||||||
|
|
||||||
// store the name of the bone
|
// store the name of the bone
|
||||||
pcOutBone->mName.length = (size_t)iMaxLen;
|
pcOutBone->mName.length = (ai_uint32)iMaxLen;
|
||||||
::memcpy(pcOutBone->mName.data, pcBone->name, pcOutBone->mName.length);
|
::memcpy(pcOutBone->mName.data, pcBone->name, pcOutBone->mName.length);
|
||||||
pcOutBone->mName.data[pcOutBone->mName.length] = '\0';
|
pcOutBone->mName.data[pcOutBone->mName.length] = '\0';
|
||||||
}
|
}
|
||||||
|
|
|
@ -590,7 +590,7 @@ void SMDImporter::CreateOutputMaterials() {
|
||||||
pScene->mMaterials[iMat] = pcMat;
|
pScene->mMaterials[iMat] = pcMat;
|
||||||
|
|
||||||
aiString szName;
|
aiString szName;
|
||||||
szName.length = (size_t)ai_snprintf(szName.data,MAXLEN,"Texture_%u",iMat);
|
szName.length = (ai_uint32)ai_snprintf(szName.data,MAXLEN,"Texture_%u",iMat);
|
||||||
pcMat->AddProperty(&szName,AI_MATKEY_NAME);
|
pcMat->AddProperty(&szName,AI_MATKEY_NAME);
|
||||||
|
|
||||||
if (aszTextures[iMat].length())
|
if (aszTextures[iMat].length())
|
||||||
|
|
|
@ -836,7 +836,7 @@ namespace glTF2 {
|
||||||
throw DeadlyExportError("Failed to write scene data!");
|
throw DeadlyExportError("Failed to write scene data!");
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t jsonChunkLength = (docBuffer.GetSize() + 3) & ~3; // Round up to next multiple of 4
|
uint32_t jsonChunkLength = (uint32_t)((docBuffer.GetSize() + 3) & ~3); // Round up to next multiple of 4
|
||||||
auto paddingLength = jsonChunkLength - docBuffer.GetSize();
|
auto paddingLength = jsonChunkLength - docBuffer.GetSize();
|
||||||
|
|
||||||
GLB_Chunk jsonChunk;
|
GLB_Chunk jsonChunk;
|
||||||
|
@ -862,7 +862,7 @@ namespace glTF2 {
|
||||||
int GLB_Chunk_count = 1;
|
int GLB_Chunk_count = 1;
|
||||||
uint32_t binaryChunkLength = 0;
|
uint32_t binaryChunkLength = 0;
|
||||||
if (bodyBuffer->byteLength > 0) {
|
if (bodyBuffer->byteLength > 0) {
|
||||||
binaryChunkLength = (bodyBuffer->byteLength + 3) & ~3; // Round up to next multiple of 4
|
binaryChunkLength = (uint32_t)((bodyBuffer->byteLength + 3) & ~3); // Round up to next multiple of 4
|
||||||
|
|
||||||
auto curPaddingLength = binaryChunkLength - bodyBuffer->byteLength;
|
auto curPaddingLength = binaryChunkLength - bodyBuffer->byteLength;
|
||||||
++GLB_Chunk_count;
|
++GLB_Chunk_count;
|
||||||
|
|
|
@ -6092,8 +6092,8 @@ mz_zip_writer_compute_padding_needed_for_file_alignment(mz_zip_archive *pZip) {
|
||||||
if (!pZip->m_file_offset_alignment)
|
if (!pZip->m_file_offset_alignment)
|
||||||
return 0;
|
return 0;
|
||||||
n = (mz_uint32)(pZip->m_archive_size & (pZip->m_file_offset_alignment - 1));
|
n = (mz_uint32)(pZip->m_archive_size & (pZip->m_file_offset_alignment - 1));
|
||||||
return (pZip->m_file_offset_alignment - n) &
|
return (mz_uint)((pZip->m_file_offset_alignment - n) &
|
||||||
(pZip->m_file_offset_alignment - 1);
|
(pZip->m_file_offset_alignment - 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
static mz_bool mz_zip_writer_write_zeros(mz_zip_archive *pZip,
|
static mz_bool mz_zip_writer_write_zeros(mz_zip_archive *pZip,
|
||||||
|
|
Loading…
Reference in New Issue