diff --git a/code/AssetLib/MDL/MDLLoader.cpp b/code/AssetLib/MDL/MDLLoader.cpp index b60657805..76b61cda5 100644 --- a/code/AssetLib/MDL/MDLLoader.cpp +++ b/code/AssetLib/MDL/MDLLoader.cpp @@ -975,7 +975,7 @@ void MDLImporter::CalcAbsBoneMatrices_3DGS_MDL7(MDL::IntBone_MDL7 **apcOutBones) } // store the name of the bone - pcOutBone->mName.length = (size_t)iMaxLen; + pcOutBone->mName.length = static_cast(iMaxLen); ::memcpy(pcOutBone->mName.data, pcBone->name, pcOutBone->mName.length); pcOutBone->mName.data[pcOutBone->mName.length] = '\0'; } diff --git a/code/AssetLib/SMD/SMDLoader.cpp b/code/AssetLib/SMD/SMDLoader.cpp index dd1f56dc3..1c73c7e66 100644 --- a/code/AssetLib/SMD/SMDLoader.cpp +++ b/code/AssetLib/SMD/SMDLoader.cpp @@ -590,7 +590,7 @@ void SMDImporter::CreateOutputMaterials() { pScene->mMaterials[iMat] = pcMat; aiString szName; - szName.length = (size_t)ai_snprintf(szName.data,MAXLEN,"Texture_%u",iMat); + szName.length = static_cast(ai_snprintf(szName.data,MAXLEN,"Texture_%u",iMat)); pcMat->AddProperty(&szName,AI_MATKEY_NAME); if (aszTextures[iMat].length()) diff --git a/code/AssetLib/glTF2/glTF2AssetWriter.inl b/code/AssetLib/glTF2/glTF2AssetWriter.inl index 868d9cbdf..6f6eda502 100644 --- a/code/AssetLib/glTF2/glTF2AssetWriter.inl +++ b/code/AssetLib/glTF2/glTF2AssetWriter.inl @@ -836,7 +836,7 @@ namespace glTF2 { throw DeadlyExportError("Failed to write scene data!"); } - uint32_t jsonChunkLength = (docBuffer.GetSize() + 3) & ~3; // Round up to next multiple of 4 + uint32_t jsonChunkLength = static_cast((docBuffer.GetSize() + 3) & ~3); // Round up to next multiple of 4 auto paddingLength = jsonChunkLength - docBuffer.GetSize(); GLB_Chunk jsonChunk; @@ -862,7 +862,7 @@ namespace glTF2 { int GLB_Chunk_count = 1; uint32_t binaryChunkLength = 0; if (bodyBuffer->byteLength > 0) { - binaryChunkLength = (bodyBuffer->byteLength + 3) & ~3; // Round up to next multiple of 4 + binaryChunkLength = static_cast((bodyBuffer->byteLength + 3) & ~3); // Round up to next multiple of 4 auto curPaddingLength = binaryChunkLength - bodyBuffer->byteLength; ++GLB_Chunk_count; diff --git a/contrib/zip/src/miniz.h b/contrib/zip/src/miniz.h index 0a5560b24..7a6ff8d1a 100644 --- a/contrib/zip/src/miniz.h +++ b/contrib/zip/src/miniz.h @@ -6092,8 +6092,8 @@ mz_zip_writer_compute_padding_needed_for_file_alignment(mz_zip_archive *pZip) { if (!pZip->m_file_offset_alignment) return 0; n = (mz_uint32)(pZip->m_archive_size & (pZip->m_file_offset_alignment - 1)); - return (pZip->m_file_offset_alignment - n) & - (pZip->m_file_offset_alignment - 1); + return (mz_uint)((pZip->m_file_offset_alignment - n) & + (pZip->m_file_offset_alignment - 1)); } static mz_bool mz_zip_writer_write_zeros(mz_zip_archive *pZip,