From 2e3520e0dd8b7de31bbf4afd5de6ecc8f941c393 Mon Sep 17 00:00:00 2001 From: Richard Roberts Date: Sat, 12 Oct 2013 21:06:19 +0000 Subject: [PATCH] Fixed some warnings --- gtsam/base/Matrix.cpp | 10 +++++----- gtsam/linear/NoiseModel.cpp | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/gtsam/base/Matrix.cpp b/gtsam/base/Matrix.cpp index b6f479387..3b21030e7 100644 --- a/gtsam/base/Matrix.cpp +++ b/gtsam/base/Matrix.cpp @@ -527,7 +527,7 @@ Matrix stack(size_t nrMatrices, ...) /* ************************************************************************* */ Matrix stack(const std::vector& blocks) { if (blocks.size() == 1) return blocks.at(0); - int nrows = 0, ncols = blocks.at(0).cols(); + DenseIndex nrows = 0, ncols = blocks.at(0).cols(); BOOST_FOREACH(const Matrix& mat, blocks) { nrows += mat.rows(); if (ncols != mat.cols()) @@ -535,7 +535,7 @@ Matrix stack(const std::vector& blocks) { } Matrix result(nrows, ncols); - int cur_row = 0; + DenseIndex cur_row = 0; BOOST_FOREACH(const Matrix& mat, blocks) { result.middleRows(cur_row, mat.rows()) = mat; cur_row += mat.rows(); @@ -584,16 +584,16 @@ Matrix collect(size_t nrMatrices, ...) /* ************************************************************************* */ // row scaling, in-place void vector_scale_inplace(const Vector& v, Matrix& A, bool inf_mask) { - const size_t m = A.rows(); + const DenseIndex m = A.rows(); if (inf_mask) { // only scale the first v.size() rows of A to support augmented Matrix - for (size_t i=0; i= b.size() // assert (b.size()==a.size()); Vector c = a; - for( size_t i = 0; i < b.size(); i++ ) { + for( DenseIndex i = 0; i < b.size(); i++ ) { const double& ai = a(i), &bi = b(i); if (bi!=0) c(i) = ai/bi; }