Skip to content

Commit

Permalink
use #if 0 instead of && 0 to disable some if's
Browse files Browse the repository at this point in the history
- avoids -Wconstant-logical-operand warning
  • Loading branch information
svigerske committed Mar 17, 2023
1 parent 19526dc commit f85d6cf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Clp/src/ClpCholeskyBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2957,13 +2957,15 @@ int ClpCholeskyBase::factorize(const CoinWorkDouble *diagonal, int *rowsDropped)
}
}
numberRowsDropped_ += newDropped;
if (numberRowsDropped_ && 0) {
#if 0
if (numberRowsDropped_) {
std::cout << "Rank " << numberRows_ - numberRowsDropped_ << " ( " << numberRowsDropped_ << " dropped)";
if (newDropped) {
std::cout << " ( " << newDropped << " dropped this time)";
}
std::cout << std::endl;
}
#endif
}
} else {
//KKT
Expand Down
4 changes: 3 additions & 1 deletion Clp/src/ClpCholeskyMumps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -437,13 +437,15 @@ int ClpCholeskyMumps::factorize(const double *diagonal, int *rowsDropped)
}
}
numberRowsDropped_ += newDropped;
if (numberRowsDropped_ && 0) {
#if 0
if (numberRowsDropped_) {
std::cout << "Rank " << numberRows_ - numberRowsDropped_ << " ( " << numberRowsDropped_ << " dropped)";
if (newDropped) {
std::cout << " ( " << newDropped << " dropped this time)";
}
std::cout << std::endl;
}
#endif
}
status_ = 0;
return newDropped;
Expand Down

0 comments on commit f85d6cf

Please sign in to comment.