Minor compile fixes, fix potential undefined behavior in CMDL.cpp

This commit is contained in:
Phillip Stephens 2019-08-23 17:09:11 -07:00
parent 2acc5c1fe5
commit f2b551b89b
2 changed files with 5 additions and 5 deletions

View File

@ -1634,14 +1634,14 @@ bool WriteMREASecs(std::vector<std::vector<uint8_t>>& secsOut, const hecl::Proje
/* Iterate meshes */
auto matIt = surfToGlobalMats.cbegin();
for (const Mesh& mesh : meshes) {
zeus::CTransform meshXf(mesh.sceneXf.val);
zeus::CTransform meshXf(mesh.sceneXf.val.data());
meshXf.basis.transpose();
/* Header */
{
MeshHeader meshHeader = {};
meshHeader.visorFlags.setFromBlenderProps(mesh.customProps);
memmove(meshHeader.xfMtx, &mesh.sceneXf, 48);
memmove(meshHeader.xfMtx, mesh.sceneXf.val.data(), 48);
zeus::CAABox aabb(zeus::CVector3f(mesh.aabbMin), zeus::CVector3f(mesh.aabbMax));
aabb = aabb.getTransformedAABox(meshXf);
@ -1912,14 +1912,14 @@ bool WriteHMDLMREASecs(std::vector<std::vector<uint8_t>>& secsOut, const hecl::P
/* Iterate meshes */
auto matIt = surfToGlobalMats.cbegin();
for (const Mesh& mesh : meshes) {
zeus::CTransform meshXf(mesh.sceneXf.val);
zeus::CTransform meshXf(mesh.sceneXf.val.data());
meshXf.basis.transpose();
/* Header */
{
MeshHeader meshHeader = {};
meshHeader.visorFlags.setFromBlenderProps(mesh.customProps);
memmove(meshHeader.xfMtx, &mesh.sceneXf, 48);
memmove(meshHeader.xfMtx, mesh.sceneXf.val.data(), 48);
zeus::CAABox aabb(zeus::CVector3f(mesh.aabbMin), zeus::CVector3f(mesh.aabbMax));
aabb = aabb.getTransformedAABox(meshXf);

2
hecl

@ -1 +1 @@
Subproject commit b4efa8667f81e9e9384321a9f77df0059b7f8915
Subproject commit 4725be4d1c93263d0f24f4616bce4d30ea0f05da