Skip to content

Commit ec358d6

Browse files
Minor code corrections (#660)
1. Remove unused variable - a counter that never gets read; modern compilers get angry about it. 2. Misuse of std::move -- we should never do "using std::move".
1 parent d426697 commit ec358d6

2 files changed

Lines changed: 2 additions & 7 deletions

File tree

include/fcl/math/geometry-inl.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,6 @@ void eigen_old(const Matrix3<S>& m, Vector3<S>& dout, Matrix3<S>& vout)
480480
int n = 3;
481481
int j, iq, ip, i;
482482
S tresh, theta, tau, t, sm, s, h, g, c;
483-
int nrot;
484483
S b[3];
485484
S z[3];
486485
S v[3][3] = {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}};
@@ -492,8 +491,6 @@ void eigen_old(const Matrix3<S>& m, Vector3<S>& dout, Matrix3<S>& vout)
492491
z[ip] = 0;
493492
}
494493

495-
nrot = 0;
496-
497494
for(i = 0; i < 50; ++i)
498495
{
499496
sm = 0;
@@ -544,7 +541,6 @@ void eigen_old(const Matrix3<S>& m, Vector3<S>& dout, Matrix3<S>& vout)
544541
for(j = ip + 1; j < iq; ++j) { g = R(ip, j); h = R(j, iq); R(ip, j) = g - s * (h + g * tau); R(j, iq) = h + s * (g - h * tau); }
545542
for(j = iq + 1; j < n; ++j) { g = R(ip, j); h = R(iq, j); R(ip, j) = g - s * (h + g * tau); R(iq, j) = h + s * (g - h * tau); }
546543
for(j = 0; j < n; ++j) { g = v[j][ip]; h = v[j][iq]; v[j][ip] = g - s * (h + g * tau); v[j][iq] = h + s * (g - h * tau); }
547-
nrot++;
548544
}
549545
}
550546
}

test/narrowphase/detail/convexity_based_algorithm/test_gjk_libccd-inl_gjk_initializer.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ namespace detail {
5151
namespace {
5252

5353
using std::make_shared;
54-
using std::move;
5554
using std::pair;
5655
using std::vector;
5756

@@ -109,8 +108,8 @@ GTEST_TEST(GjkLibccdSupportFunction, ConvexSupport) {
109108
// clang-format on
110109
const int kNumFaces = 6;
111110
const bool kThrowIfInvalid = true;
112-
const Convex<double> convex_C(move(vertices), kNumFaces, move(faces),
113-
kThrowIfInvalid);
111+
const Convex<double> convex_C(std::move(vertices), kNumFaces,
112+
std::move(faces), kThrowIfInvalid);
114113

115114
/* Collection of arbitrary poses of the convex mesh: identity, translation,
116115
and rotation. */

0 commit comments

Comments
 (0)