From ad857b46bf2382e2b2567f97101404f94e4dbbc8 Mon Sep 17 00:00:00 2001 From: Jonathan Youett <youett@mi.fu-berlin.de> Date: Fri, 10 Jan 2014 16:53:51 +0000 Subject: [PATCH] Avoid warnings about comparsion of int/unsigned int [[Imported from SVN: r12628]] --- dune/contact/assemblers/nbodyassembler.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dune/contact/assemblers/nbodyassembler.cc b/dune/contact/assemblers/nbodyassembler.cc index db6ea2b3..ada0bf62 100644 --- a/dune/contact/assemblers/nbodyassembler.cc +++ b/dune/contact/assemblers/nbodyassembler.cc @@ -571,14 +571,14 @@ assembleRightHandSide(const std::vector<DiscFuncType>& rhs, int idx = 0; - for (int i=0; i<rhs.size(); i++) { + for (size_t i=0; i<rhs.size(); i++) { - for (int j=0; j<rhs[i].size(); j++) + for (size_t j=0; j<rhs[i].size(); j++) untransformedTotalRhs[idx++] = rhs[i][j]; } - if (this->BT_.M() != idx) + if ((int) this->BT_.M() != idx) DUNE_THROW(Dune::Exception, "assembleRightHandSide: vector size and matrix size don't match!"); // Transform the basis of the ansatz space @@ -738,7 +738,7 @@ computeTransformationMatrix() MatrixIndexSet indicesBT(nRows, nCols); // BT_ is the identity plus some off-diagonal elements - for (int i=0; i<indicesBT.rows(); i++) + for (size_t i=0; i<indicesBT.rows(); i++) indicesBT.add(i,i); // Enter all the off-diagonal entries -- GitLab