Verified Commit 501db789 authored by Justin Carpentier's avatar Justin Carpentier
Browse files

core: use const ref when possible

parent 3ed4c0c4
......@@ -261,8 +261,8 @@ namespace fcl {
FCL_REAL& dist, Vec3f& p1, Vec3f& p2,
Vec3f& normal)
{
Vec3f o1 = tf1.getTranslation();
Vec3f o2 = tf2.getTranslation();
const Vec3f & o1 = tf1.getTranslation();
const Vec3f & o2 = tf2.getTranslation();
Vec3f diff = o1 - o2;
FCL_REAL len = diff.norm();
normal = -diff/len;
......@@ -639,7 +639,7 @@ namespace fcl {
{
if(p1 || p2)
{
Vec3f o = tf.getTranslation();
const Vec3f & o = tf.getTranslation();
Project::ProjectResult result;
result = Project::projectTriangle(P1, P2, P3, o);
if(result.sqr_distance > sp.radius * sp.radius)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment