Commit c898908ba3c9420c42105c6ad0913c1373e5e527
1 parent
62b2b299
Correct cppcheck style errors.
Showing
3 changed files
with
2 additions
and
6 deletions
src/ctbutterfly/ctbutterfly.cpp
| @@ -763,10 +763,6 @@ void ctbutterfly::eigenvectors(const double& a, | @@ -763,10 +763,6 @@ void ctbutterfly::eigenvectors(const double& a, | ||
| 763 | *lambda2 = arg1 - arg2; | 763 | *lambda2 = arg1 - arg2; |
| 764 | 764 | ||
| 765 | // Compute eigenvectors | 765 | // Compute eigenvectors |
| 766 | - double vector1_1; | ||
| 767 | - double vector1_2; | ||
| 768 | - double vector2_1; | ||
| 769 | - double vector2_2; | ||
| 770 | if (c != 0.0) { | 766 | if (c != 0.0) { |
| 771 | (*vector1)[0] = *lambda1 - det; | 767 | (*vector1)[0] = *lambda1 - det; |
| 772 | (*vector1)[1] = c; | 768 | (*vector1)[1] = c; |
src/ctlike/ctlike.cpp
| @@ -256,7 +256,7 @@ void ctlike::run(void) | @@ -256,7 +256,7 @@ void ctlike::run(void) | ||
| 256 | } | 256 | } |
| 257 | 257 | ||
| 258 | // Compute TS values if requested | 258 | // Compute TS values if requested |
| 259 | - if (ts_srcs.size() > 0) { | 259 | + if (!ts_srcs.empty()) { |
| 260 | 260 | ||
| 261 | // Store original maximum likelihood and models | 261 | // Store original maximum likelihood and models |
| 262 | double logL_src = m_logL; | 262 | double logL_src = m_logL; |
src/ctselect/ctselect.cpp
| @@ -1107,7 +1107,7 @@ std::string ctselect::check_infile(const std::string& filename) const | @@ -1107,7 +1107,7 @@ std::string ctselect::check_infile(const std::string& filename) const | ||
| 1107 | } | 1107 | } |
| 1108 | 1108 | ||
| 1109 | // Set error message for missing columns | 1109 | // Set error message for missing columns |
| 1110 | - if (missing.size() > 0) { | 1110 | + if (!missing.empty()) { |
| 1111 | message = "The following columns are missing in the" | 1111 | message = "The following columns are missing in the" |
| 1112 | " \"EVENTS\" extension of input file \"" | 1112 | " \"EVENTS\" extension of input file \"" |
| 1113 | + m_outobs + "\": "; | 1113 | + m_outobs + "\": "; |