From 239feddeef1ef34e47d87b9bb444216d3bef8109 Mon Sep 17 00:00:00 2001 From: Joseph Mirabel <jmirabel@laas.fr> Date: Fri, 10 Jun 2016 19:04:11 +0200 Subject: [PATCH] Add some 'noalias' --- src/BV/OBB.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/BV/OBB.cpp b/src/BV/OBB.cpp index 14b256d5..f2bcd094 100644 --- a/src/BV/OBB.cpp +++ b/src/BV/OBB.cpp @@ -75,7 +75,7 @@ inline OBB merge_largedist(const OBB& b1, const OBB& b2) Vec3f vertex_proj[16]; for(int i = 0; i < 16; ++i) - vertex_proj[i] = vertex[i] - b.axes.col(0) * vertex[i].dot(b.axes.col(0)); + vertex_proj[i].noalias() = vertex[i] - b.axes.col(0) * vertex[i].dot(b.axes.col(0)); getCovariance(vertex_proj, NULL, NULL, NULL, 16, M); eigen(M, s, E); @@ -95,8 +95,8 @@ inline OBB merge_largedist(const OBB& b1, const OBB& b2) Vec3f center, extent; getExtentAndCenter(vertex, NULL, NULL, NULL, 16, b.axes, center, extent); - b.To = center; - b.extent = extent; + b.To.noalias() = center; + b.extent.noalias() = extent; return b; } -- GitLab