about summary refs log tree commit diff
path: root/src/debug.cpp
diff options
context:
space:
mode:
authorPjotr Prins2017-10-10 10:02:28 +0000
committerPjotr Prins2017-10-10 10:02:28 +0000
commite561cae2c69e1b3607e6799cdc53df456ac13601 (patch)
tree0c739f7ce5aee9b507fecc5b8d5667f45d673053 /src/debug.cpp
parentab2a1830659ac970d97c107f145105fb410eb219 (diff)
downloadpangemma-e561cae2c69e1b3607e6799cdc53df456ac13601.tar.gz
Removing warnings on debug.h assignment
Diffstat (limited to 'src/debug.cpp')
-rw-r--r--src/debug.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/debug.cpp b/src/debug.cpp
index da0d06f..6fa17bc 100644
--- a/src/debug.cpp
+++ b/src/debug.cpp
@@ -23,8 +23,8 @@ void do_validate_K(const gsl_matrix *K, bool do_check, bool strict, const char *
   if (do_check) {
     // debug_msg("Validating K");
     auto eigenvalues = getEigenValues(K);
-    uint count_small;
-    if (count_small = count_small_values(eigenvalues,EIGEN_MINVALUE)>1) {
+    const uint count_small = count_small_values(eigenvalues,EIGEN_MINVALUE);
+    if (count_small>1) {
       std::string msg = "K has ";
       msg += std::to_string(count_small);
       msg += " eigenvalues close to zero";
@@ -38,7 +38,7 @@ void do_validate_K(const gsl_matrix *K, bool do_check, bool strict, const char *
     if (negative_values = has_negative_values_but_one(eigenvalues)) {
       warning_at_msg(__file,__line,"K has more than one negative eigenvalues!");
     }
-    if (count_small>=0 && negative_values && !isMatrixPositiveDefinite(K))
+    if (count_small>0 && negative_values && !isMatrixPositiveDefinite(K))
       fail_at_msg(strict,__file,__line,"K is not positive definite!");
     gsl_vector_free(eigenvalues);
   }