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:
Sameer Agarwal
2022-02-02 13:17:29 -08:00
parent a35bd1bf90
commit ae65219e04
171 changed files with 1191 additions and 1148 deletions
+3 -2
View File
@@ -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();