From c898908ba3c9420c42105c6ad0913c1373e5e527 Mon Sep 17 00:00:00 2001 From: Jürgen Knödlseder Date: Sat, 31 Oct 2015 14:45:30 +0100 Subject: [PATCH] Correct cppcheck style errors. --- src/ctbutterfly/ctbutterfly.cpp | 4 ---- src/ctlike/ctlike.cpp | 2 +- src/ctselect/ctselect.cpp | 2 +- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/ctbutterfly/ctbutterfly.cpp b/src/ctbutterfly/ctbutterfly.cpp index 8085375..96ab1ae 100644 --- a/src/ctbutterfly/ctbutterfly.cpp +++ b/src/ctbutterfly/ctbutterfly.cpp @@ -763,10 +763,6 @@ void ctbutterfly::eigenvectors(const double& a, *lambda2 = arg1 - arg2; // Compute eigenvectors - double vector1_1; - double vector1_2; - double vector2_1; - double vector2_2; if (c != 0.0) { (*vector1)[0] = *lambda1 - det; (*vector1)[1] = c; diff --git a/src/ctlike/ctlike.cpp b/src/ctlike/ctlike.cpp index d34e80f..a78b167 100644 --- a/src/ctlike/ctlike.cpp +++ b/src/ctlike/ctlike.cpp @@ -256,7 +256,7 @@ void ctlike::run(void) } // Compute TS values if requested - if (ts_srcs.size() > 0) { + if (!ts_srcs.empty()) { // Store original maximum likelihood and models double logL_src = m_logL; diff --git a/src/ctselect/ctselect.cpp b/src/ctselect/ctselect.cpp index 0ef39d3..706116d 100644 --- a/src/ctselect/ctselect.cpp +++ b/src/ctselect/ctselect.cpp @@ -1107,7 +1107,7 @@ std::string ctselect::check_infile(const std::string& filename) const } // Set error message for missing columns - if (missing.size() > 0) { + if (!missing.empty()) { message = "The following columns are missing in the" " \"EVENTS\" extension of input file \"" + m_outobs + "\": "; -- libgit2 0.21.4