mbsim-env / mbsim

A multi-body simulation software
https://www.mbsim-env.de
GNU Lesser General Public License v2.1
42 stars 16 forks source link

Lemke algorithm files have booleans being compared to integers #42

Closed leo-bart closed 6 years ago

leo-bart commented 6 years ago

Lemke's linear complementarity solution have booleans being compared to integers when setting the debug level. This issue the following errors when compiling with g++:

lemke_algorithm.cc: In member function ‘fmatvec::Vec MBSim::LemkeAlgorithm::solve(unsigned int): lemke_algorithm.cc:72:20: error: comparison of constant ‘3’ with boolean expression is always false [-Werror=bool-compare] if (DEBUGLEVEL >= 3) { ^ lemke_algorithm.cc:93:24: error: comparison of constant ‘3’ with boolean expression is always false [-Werror=bool-compare] if (DEBUGLEVEL >= 3) { ^ lemke_algorithm.cc:139:20: error: comparison of constant ‘2’ with boolean expression is always false [-Werror=bool-compare] if (DEBUGLEVEL >= 2) {

friedrichatgc commented 6 years ago

fixed with 1f800a353c42b8ce152ad81b568db807bbcc5c63