Commit 06ff5369 authored by Jan Möbius's avatar Jan Möbius

Fixed some cppcheck warnings

git-svn-id: http://www.openflipper.org/svnrepo/CoMISo/trunk@147 1355f012-dd97-4b2f-ae87-10fa9f823a57
parent 3bbfe4ca
......@@ -198,7 +198,7 @@ solve(NProblemInterface* _problem,
std::cout << "GUROBI Objective: " << model.get(GRB_DoubleAttr_ObjVal) << std::endl;
return true;
}
catch(GRBException e)
catch(GRBException& e)
{
std::cout << "Error code = " << e.getErrorCode() << std::endl;
std::cout << e.getMessage() << std::endl;
......
......@@ -524,7 +524,7 @@ MISolver::solve_multiple_rounding(
time_search_next_integer += sw.stop();
// nothing more to do?
if( tr_best.size() == 0)
if( tr_best.empty() )
break;
if( noisy_ > 5)
......@@ -668,7 +668,7 @@ MISolver::solve_gurobi(
std::cout << "GUROBI objective: " << model.get(GRB_DoubleAttr_ObjVal) << std::endl;
}
catch(GRBException e)
catch(GRBException& e)
{
std::cout << "Error code = " << e.getErrorCode() << std::endl;
std::cout << e.getMessage() << std::endl;
......
......@@ -230,7 +230,7 @@ public:
bool add( int _id, double _rd_val)
{
// empty set? -> always add one element
if( rset_.size() == 0 || cur_sum_+_rd_val <= threshold_)
if( rset_.empty() || cur_sum_+_rd_val <= threshold_)
{
rset_.insert( PairDI(_rd_val,_id) );
cur_sum_ += _rd_val;
......
......@@ -168,8 +168,6 @@ bool UMFPACKSolver::update_system( const std::vector<int>& _colptr,
rowind_ = _rowind;
values_ = _values;
int n = colptr_.size()-1;
if( numeric_ )
{
umfpack_di_free_numeric( &numeric_);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment