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:
@@ -63,9 +63,9 @@ bool SetupEvaluator(PreprocessedProblem* pp) {
|
||||
pp->evaluator_options.context = pp->problem->context();
|
||||
pp->evaluator_options.evaluation_callback =
|
||||
pp->reduced_program->mutable_evaluation_callback();
|
||||
pp->evaluator.reset(Evaluator::Create(
|
||||
pp->evaluator_options, pp->reduced_program.get(), &pp->error));
|
||||
return (pp->evaluator.get() != NULL);
|
||||
pp->evaluator = Evaluator::Create(
|
||||
pp->evaluator_options, pp->reduced_program.get(), &pp->error);
|
||||
return (pp->evaluator.get() != nullptr);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
@@ -85,10 +85,10 @@ bool LineSearchPreprocessor::Preprocess(const Solver::Options& options,
|
||||
return false;
|
||||
}
|
||||
|
||||
pp->reduced_program.reset(program->CreateReducedProgram(
|
||||
&pp->removed_parameter_blocks, &pp->fixed_cost, &pp->error));
|
||||
pp->reduced_program = program->CreateReducedProgram(
|
||||
&pp->removed_parameter_blocks, &pp->fixed_cost, &pp->error);
|
||||
|
||||
if (pp->reduced_program.get() == NULL) {
|
||||
if (pp->reduced_program.get() == nullptr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user