mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-29 08:34:37 +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:
@@ -49,7 +49,8 @@ ScratchEvaluatePreparer* ScratchEvaluatePreparer::Create(const Program& program,
|
||||
}
|
||||
|
||||
void ScratchEvaluatePreparer::Init(int max_derivatives_per_residual_block) {
|
||||
jacobian_scratch_.reset(new double[max_derivatives_per_residual_block]);
|
||||
jacobian_scratch_ =
|
||||
std::make_unique<double[]>(max_derivatives_per_residual_block);
|
||||
}
|
||||
|
||||
// Point the jacobian blocks into the scratch area of this evaluate preparer.
|
||||
@@ -64,7 +65,7 @@ void ScratchEvaluatePreparer::Prepare(const ResidualBlock* residual_block,
|
||||
const ParameterBlock* parameter_block =
|
||||
residual_block->parameter_blocks()[j];
|
||||
if (parameter_block->IsConstant()) {
|
||||
jacobians[j] = NULL;
|
||||
jacobians[j] = nullptr;
|
||||
} else {
|
||||
jacobians[j] = jacobian_block_cursor;
|
||||
jacobian_block_cursor += num_residuals * parameter_block->TangentSize();
|
||||
|
||||
Reference in New Issue
Block a user