mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-29 16:40:38 +08:00
ClangTidy cleanups
1. NULL -> nullptr 2. foo.reset(new Bar) -> = foo = std::make_unique<Bar>() 3. Missing std library includes & prefixes Change-Id: I260b261b484554be681ee5a7398126fdb3b3a789
This commit is contained in:
@@ -32,7 +32,7 @@ interpolation schemes by using a `SizedCostFunction` and defining the
|
||||
|
||||
```c++
|
||||
bool Evaluate(double const* const* parameters, double* residuals, double** jacobians) const {
|
||||
if (jacobians == NULL || jacobians[0] == NULL)
|
||||
if (jacobians == nullptr || jacobians[0] == nullptr)
|
||||
interpolator_.Evaluate(parameters[0][0], residuals);
|
||||
else
|
||||
interpolator_.Evaluate(parameters[0][0], residuals, jacobians[0]);
|
||||
|
||||
@@ -82,7 +82,7 @@ int main(int argc, char** argv) {
|
||||
double x = 1.0;
|
||||
Problem problem;
|
||||
CostFunction* cost_function = InterpolatedCostFunctor::Create(interpolator);
|
||||
problem.AddResidualBlock(cost_function, NULL, &x);
|
||||
problem.AddResidualBlock(cost_function, nullptr, &x);
|
||||
|
||||
Solver::Options options;
|
||||
options.minimizer_progress_to_stdout = true;
|
||||
|
||||
Reference in New Issue
Block a user