From c25034710ede8eb7e177e8a7426817b6a29e5440 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Thu, 7 Jun 2018 16:09:22 +0200 Subject: Fiw some warnings in dox examples --- doc/examples/Cwise_lgamma.cpp | 2 +- doc/examples/Tutorial_simple_example_dynamic_size.cpp | 2 +- doc/special_examples/Tutorial_sparse_example.cpp | 6 +++++- 3 files changed, 7 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/examples/Cwise_lgamma.cpp b/doc/examples/Cwise_lgamma.cpp index f1c4f503e..6bfaccbce 100644 --- a/doc/examples/Cwise_lgamma.cpp +++ b/doc/examples/Cwise_lgamma.cpp @@ -6,4 +6,4 @@ int main() { Array4d v(0.5,10,0,-1); std::cout << v.lgamma() << std::endl; -} \ No newline at end of file +} diff --git a/doc/examples/Tutorial_simple_example_dynamic_size.cpp b/doc/examples/Tutorial_simple_example_dynamic_size.cpp index 0f0280e0e..defcb1ee4 100644 --- a/doc/examples/Tutorial_simple_example_dynamic_size.cpp +++ b/doc/examples/Tutorial_simple_example_dynamic_size.cpp @@ -10,7 +10,7 @@ int main() MatrixXi m(size,size+1); // a (size)x(size+1)-matrix of int's for (int j=0; j #include +#include typedef Eigen::SparseMatrix SpMat; // declares a column-major sparse matrix type of double typedef Eigen::Triplet T; @@ -9,7 +10,10 @@ void saveAsBitmap(const Eigen::VectorXd& x, int n, const char* filename); int main(int argc, char** argv) { - assert(argc==2); + if(argc!=2) { + std::cerr << "Error: expected one and only one argument.\n"; + return -1; + } int n = 300; // size of the image int m = n*n; // number of unknowns (=number of pixels) -- cgit v1.2.3