ClangTidy fixes

Change-Id: I188d6332c16f4c91bf92309e1eb524863e0c13ed
This commit is contained in:
Sameer Agarwal
2022-01-26 13:24:58 -08:00
parent 40fb413558
commit 5a99e42e19
3 changed files with 7 additions and 5 deletions
+4 -4
View File
@@ -82,12 +82,12 @@ TEST(AutoDiffLManifoldTest, EuclideanManifold) {
}
struct ScaledFunctor {
explicit ScaledFunctor(const double s) : s_(s) {}
explicit ScaledFunctor(const double s) : s(s) {}
template <typename T>
bool Plus(const T* x, const T* delta, T* x_plus_delta) const {
for (int i = 0; i < 3; ++i) {
x_plus_delta[i] = x[i] + s_ * delta[i];
x_plus_delta[i] = x[i] + s * delta[i];
}
return true;
}
@@ -95,12 +95,12 @@ struct ScaledFunctor {
template <typename T>
bool Minus(const T* y, const T* x, T* y_minus_x) const {
for (int i = 0; i < 3; ++i) {
y_minus_x[i] = (y[i] - x[i]) / s_;
y_minus_x[i] = (y[i] - x[i]) / s;
}
return true;
}
double s_;
const double s;
};
TEST(AutoDiffManifoldTest, ScaledManifold) {
+2 -1
View File
@@ -32,6 +32,7 @@
#include <algorithm>
#include <memory>
#include <string>
#ifndef CERES_NO_LAPACK
@@ -94,7 +95,7 @@ LinearSolverTerminationType DenseCholesky::FactorAndSolve(
LinearSolverTerminationType EigenDenseCholesky::Factorize(
int num_cols, double* lhs, std::string* message) {
Eigen::Map<Eigen::MatrixXd> m(lhs, num_cols, num_cols);
llt_.reset(new LLTType(m));
llt_ = std::make_unique<LLTType>(m);
if (llt_->info() != Eigen::Success) {
*message = "Eigen failure. Unable to perform dense Cholesky factorization.";
return LINEAR_SOLVER_FAILURE;
+1
View File
@@ -32,6 +32,7 @@
#include <memory>
#include <numeric>
#include <string>
#include <vector>
#include "Eigen/Dense"