Trivial change, but VS 2012 was choking on this in release mode.

release/4.3a0
cbeall3 2014-05-01 12:53:05 -04:00
parent 2b20d61221
commit d8121a25bb
1 changed files with 6 additions and 7 deletions

View File

@ -367,13 +367,12 @@ void HessianFactor::hessianDiagonal(double* d) const {
typedef Eigen::Map<DVector> DMap;
// Loop over all variables in the factor
for (DenseIndex pos = 0; pos < (DenseIndex)size(); ++pos) {
Key j = keys_[pos];
// Get the diagonal block, and insert its diagonal
Matrix B = info_(pos, pos).selfadjointView();
DVector dj = B.diagonal();
DMap(d + 9 * j) += dj;
}
for (DenseIndex pos = 0; pos < (DenseIndex)size(); ++pos) {
Key j = keys_[pos];
// Get the diagonal block, and insert its diagonal
const Matrix& B = info_(pos, pos).selfadjointView();
DMap(d + 9 * j) += B.diagonal();
}
}
/* ************************************************************************* */