From f98be94d6d4ae4efdb913b4c571ee09f68c49a67 Mon Sep 17 00:00:00 2001 From: Kaspar Fischer Date: Wed, 15 Feb 2006 12:21:14 +0000 Subject: [PATCH] - prefixed atoi and exit with "std::" --- QP_solver/include/CGAL/QP_solver.C | 4 ++-- QP_solver/test/QP_solver/test_MPS.C | 4 +++- QP_solver/test/QP_solver/test_solver.C | 8 +++++--- QP_solver/test/QP_solver/test_suite_QP_solver.C | 9 ++++++--- 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/QP_solver/include/CGAL/QP_solver.C b/QP_solver/include/CGAL/QP_solver.C index 62b9c811160..cabf9a33a00 100644 --- a/QP_solver/include/CGAL/QP_solver.C +++ b/QP_solver/include/CGAL/QP_solver.C @@ -1213,8 +1213,8 @@ expel_artificial_variables_from_basis( ) } } if ((art_basic != 0) && no_ineq) { - std::cerr << "Constraint matrix has not full row rank" << std::endl; - exit(1); + CGAL_qpe_assertion_msg(false, + "Constraint matrix has not full row rank"); } // remove the remaining ones with their corresponding equality constraints diff --git a/QP_solver/test/QP_solver/test_MPS.C b/QP_solver/test/QP_solver/test_MPS.C index 8f8cd8609e0..a85cf2c4e57 100644 --- a/QP_solver/test/QP_solver/test_MPS.C +++ b/QP_solver/test/QP_solver/test_MPS.C @@ -19,6 +19,8 @@ #include #include +#include + #include #include #include @@ -50,7 +52,7 @@ int main(const int argNr,const char **args) { if (!qp.is_valid()) { cout << "Input is not a valid MPS file." << endl << "Error: " << qp.error() << endl; - exit(2); + std::exit(2); } if (verbosity > 0) { diff --git a/QP_solver/test/QP_solver/test_solver.C b/QP_solver/test/QP_solver/test_solver.C index af83237b8e6..2bb18eb6485 100644 --- a/QP_solver/test/QP_solver/test_solver.C +++ b/QP_solver/test/QP_solver/test_solver.C @@ -23,6 +23,8 @@ #include #include +#include + #include #include #include @@ -123,13 +125,13 @@ std::string replace1(const std::string& msg,const std::string& replacement) void bailout(const char *msg) { std::cout << "Error: " << msg << '.' << std::endl; - exit(1); + std::exit(1); } void bailout1(const char *msg,const std::string& param) { std::cout << "Error: " << replace1(msg,param) << '.' << std::endl; - exit(1); + std::exit(1); } void usage() @@ -162,7 +164,7 @@ void usage() << "for symmetric and the non-dedicated solver on the instance).\n" << "You can also negate the options 'l', 's', 'r', or 'f' by\n" << "replacing the '-' by a '+'.\n"; - exit(1); + std::exit(1); } namespace Token { // A simple token reader with put-back facility. diff --git a/QP_solver/test/QP_solver/test_suite_QP_solver.C b/QP_solver/test/QP_solver/test_suite_QP_solver.C index 1d284aaa205..b23637b8726 100644 --- a/QP_solver/test/QP_solver/test_suite_QP_solver.C +++ b/QP_solver/test/QP_solver/test_suite_QP_solver.C @@ -29,7 +29,10 @@ #include #include #include + #include +#include + #include #include #include @@ -786,7 +789,7 @@ bool map_tags(std::ifstream& from, int verbose, int pricing_strategy_index, break; default : error("impossible tag value"); - exit(-1); + std::exit(-1); } } else if (i==4) { // is_in_standard_form if (p->second == '1') @@ -799,12 +802,12 @@ bool map_tags(std::ifstream& from, int verbose, int pricing_strategy_index, break; default : error("impossible tag value"); - exit(-1); + std::exit(-1); } } } else { error("unspecified tags"); - exit(-1); + std::exit(-1); } }