Lint cleanup and a bug fix.

Thanks to William Rucklidge.

Change-Id: I963656be661020abacbff792cfc3025623503db8
This commit is contained in:
Sameer Agarwal
2013-10-03 14:37:07 -07:00
parent f519ff7ba6
commit 10ac7d8048
4 changed files with 34 additions and 26 deletions
@@ -108,8 +108,8 @@ class DynamicNumericDiffCostFunction : public CostFunction {
<< "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;
}