mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-29 16:40:38 +08:00
Fix two segaults in test code.
Thanks to Sergey Popov for reporting this. Change-Id: Ib5124a90fc42ae9d7295c04d51a5dd8d16250504
This commit is contained in:
committed by
ceres-solver code review
parent
ab8e2dc453
commit
fba3844b43
@@ -818,8 +818,8 @@ class StaticEvaluateTest : public ::testing::Test {
|
||||
expected_gradient,
|
||||
expected_jacobian,
|
||||
cost,
|
||||
&residuals[0],
|
||||
&gradient[0],
|
||||
residuals.size() > 0 ? &residuals[0] : NULL,
|
||||
gradient.size() > 0 ? &gradient[0] : NULL,
|
||||
dense_jacobian.data());
|
||||
}
|
||||
|
||||
|
||||
@@ -119,7 +119,7 @@ TEST(LevenbergMarquardtStrategy, CorrectDiagonalToLinearSolver) {
|
||||
jacobian(0,2) = 100.0;
|
||||
|
||||
double residual = 1.0;
|
||||
double x[2];
|
||||
double x[3];
|
||||
DenseSparseMatrix dsm(jacobian);
|
||||
|
||||
TrustRegionStrategy::Options options;
|
||||
|
||||
Reference in New Issue
Block a user