commit | 10ac7d80483622f5192b110da6383d1330b7d5ae | [log] [tgz] |
---|---|---|
author | Sameer Agarwal <sameeragarwal@google.com> | Thu Oct 03 14:37:07 2013 -0700 |
committer | Sameer Agarwal <sameeragarwal@google.com> | Thu Oct 03 14:37:07 2013 -0700 |
tree | 1b794d2efaa1a7e45462ff4f87992e284673cc54 | |
parent | f519ff7ba6e619a60ea9110a8af042371a4c2180 [diff] [blame] |
Lint cleanup and a bug fix. Thanks to William Rucklidge. Change-Id: I963656be661020abacbff792cfc3025623503db8
diff --git a/include/ceres/dynamic_numeric_diff_cost_function.h b/include/ceres/dynamic_numeric_diff_cost_function.h index c30e0f1..9f70000 100644 --- a/include/ceres/dynamic_numeric_diff_cost_function.h +++ b/include/ceres/dynamic_numeric_diff_cost_function.h
@@ -108,8 +108,8 @@ << "You must call DynamicNumericDiffCostFunction::AddParameterBlock() " << "before DynamicNumericDiffCostFunction::Evaluate()."; - bool status = (*functor_)(parameters, residuals); - if (jacobians == NULL) { + const bool status = (*functor_)(parameters, residuals); + if (jacobians == NULL || !status) { return status; }