From 2d93060291f3373a3325413159062a3b4d1e95e8 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Mon, 20 Jul 2015 13:55:48 +0200 Subject: Fix trivial warnings. --- doc/special_examples/Tutorial_sparse_example.cpp | 2 ++ doc/special_examples/Tutorial_sparse_example_details.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'doc/special_examples') diff --git a/doc/special_examples/Tutorial_sparse_example.cpp b/doc/special_examples/Tutorial_sparse_example.cpp index 002f19f01..830e196ea 100644 --- a/doc/special_examples/Tutorial_sparse_example.cpp +++ b/doc/special_examples/Tutorial_sparse_example.cpp @@ -9,6 +9,8 @@ void saveAsBitmap(const Eigen::VectorXd& x, int n, const char* filename); int main(int argc, char** argv) { + assert(argc==2); + int n = 300; // size of the image int m = n*n; // number of unknows (=number of pixels) diff --git a/doc/special_examples/Tutorial_sparse_example_details.cpp b/doc/special_examples/Tutorial_sparse_example_details.cpp index 7d820b44a..bc18b0188 100644 --- a/doc/special_examples/Tutorial_sparse_example_details.cpp +++ b/doc/special_examples/Tutorial_sparse_example_details.cpp @@ -8,7 +8,7 @@ typedef Eigen::Triplet T; void insertCoefficient(int id, int i, int j, double w, std::vector& coeffs, Eigen::VectorXd& b, const Eigen::VectorXd& boundary) { - int n = boundary.size(); + int n = int(boundary.size()); int id1 = i+j*n; if(i==-1 || i==n) b(id) -= w * boundary(j); // constrained coefficient -- cgit v1.2.3