use auto instead

release/4.3a0
kartik arcot 2023-01-11 11:21:05 -08:00
parent 200aa13701
commit 319342ab89
2 changed files with 3 additions and 3 deletions

View File

@ -49,8 +49,8 @@ TEST( Rot3AttitudeFactor, Constructor ) {
Rot3 nRb;
EXPECT(assert_equal((Vector) Z_2x1,factor.evaluateError(nRb),1e-5));
std::function<Vector(const Rot3&)> err_fn = [&factor](const Rot3& r){
return factor.evaluateError(r, OptionalNone);
auto err_fn = [&factor](const Rot3& r){
return factor.evaluateError(r, OptionalNone);
};
// Calculate numerical derivatives
Matrix expectedH = numericalDerivative11<Vector, Rot3>(err_fn, nRb);

View File

@ -140,7 +140,7 @@ TEST( OrientedPlane3Factor, Derivatives ) {
OrientedPlane3Factor factor(p.planeCoefficients(), noise, poseKey, planeKey);
// Calculate numerical derivatives
std::function<Vector(const Pose3&, const OrientedPlane3&)> f = [&factor](const Pose3& p, const OrientedPlane3& o) {
auto f = [&factor](const Pose3& p, const OrientedPlane3& o) {
return factor.evaluateError(p, o);
};
Matrix numericalH1 = numericalDerivative21<Vector, Pose3, OrientedPlane3>(f, poseLin, pLin);