Fixed more warnings

release/4.3a0
Richard Roberts 2013-12-03 19:46:40 +00:00
parent 3da894b152
commit 737e3806bb
2 changed files with 12 additions and 12 deletions

View File

@ -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_;

View File

@ -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);