diff --git a/gtsam/base/SymmetricBlockMatrixBlockExpr.h b/gtsam/base/SymmetricBlockMatrixBlockExpr.h index 9c7676ae3..6a65b2748 100644 --- a/gtsam/base/SymmetricBlockMatrixBlockExpr.h +++ b/gtsam/base/SymmetricBlockMatrixBlockExpr.h @@ -211,21 +211,21 @@ namespace gtsam { if(blockType_ == SelfAdjoint) { - assert(other.blockType() == SelfAdjoint); + assert((BlockType)other.blockType() == SelfAdjoint); triangularView() += other.triangularView().nestedExpression(); } else if(blockType_ == Plain) { - assert(other.blockType() == Plain || other.blockType() == Transposed); - if(other.blockType() == Transposed) + assert((BlockType)other.blockType() == Plain || (BlockType)other.blockType() == Transposed); + if((BlockType)other.blockType() == Transposed) myBlock_ += other.myBlock_.transpose(); else myBlock_ += other.myBlock_; } else { - assert(other.blockType() == Plain || other.blockType() == Transposed); - if(other.blockType() == Transposed) + assert((BlockType)other.blockType() == Plain || (BlockType)other.blockType() == Transposed); + if((BlockType)other.blockType() == Transposed) myBlock_.transpose() += other.myBlock_.transpose(); else myBlock_.transpose() += other.myBlock_; @@ -310,21 +310,21 @@ namespace gtsam { if(blockType_ == SelfAdjoint) { - assert(other.blockType() == SelfAdjoint); + assert((BlockType)other.blockType() == SelfAdjoint); triangularView() = other.triangularView().nestedExpression(); } else if(blockType_ == Plain) { - assert(other.blockType() == Plain || other.blockType() == Transposed); - if(other.blockType() == Transposed) + assert((BlockType)other.blockType() == Plain || (BlockType)other.blockType() == Transposed); + if((BlockType)other.blockType() == Transposed) myBlock_ = other.myBlock_.transpose(); else myBlock_ = other.myBlock_; } else { - assert(other.blockType() == Plain || other.blockType() == Transposed); - if(other.blockType() == Transposed) + assert((BlockType)other.blockType() == Plain || (BlockType)other.blockType() == Transposed); + if((BlockType)other.blockType() == Transposed) myBlock_.transpose() = other.myBlock_.transpose(); else myBlock_.transpose() = other.myBlock_; diff --git a/gtsam/linear/HessianFactor.cpp b/gtsam/linear/HessianFactor.cpp index 67ad682b5..d8344abe1 100644 --- a/gtsam/linear/HessianFactor.cpp +++ b/gtsam/linear/HessianFactor.cpp @@ -448,10 +448,10 @@ void HessianFactor::updateATA(const JacobianFactor& update, const Scatter& scatt gttic(update); DenseIndex nrInfoBlocks = this->info_.nBlocks(), nrUpdateBlocks = updateBlocks.nBlocks(); for(DenseIndex j2 = 0; j2 < nrUpdateBlocks; ++j2) { // Horizontal block of Hessian - DenseIndex slot2 = (j2 == update.size()) ? nrInfoBlocks-1 : slots[j2]; + DenseIndex slot2 = (j2 == (DenseIndex)update.size()) ? nrInfoBlocks-1 : slots[j2]; assert(slot2 >= 0 && slot2 <= nrInfoBlocks); for(DenseIndex j1 = 0; j1 <= j2; ++j1) { // Vertical block of Hessian - DenseIndex slot1 = (j1 == update.size()) ? nrInfoBlocks-1 : slots[j1]; + DenseIndex slot1 = (j1 == (DenseIndex)update.size()) ? nrInfoBlocks-1 : slots[j1]; assert(slot1 >= 0 && slot1 < nrInfoBlocks); if(slot1 != slot2) info_(slot1, slot2).knownOffDiagonal() += updateBlocks(j1).transpose() * updateBlocks(j2);