From: David Wells Date: Tue, 3 Jan 2017 17:44:06 +0000 (-0500) Subject: Prefer logical OR to boolean OR. X-Git-Tag: v8.5.0-rc1~291^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5b4ffa197a52926267befe2936dedcf8b5a04383;p=dealii.git Prefer logical OR to boolean OR. This was caught by cppcheck. --- diff --git a/include/deal.II/lac/solver_cg.h b/include/deal.II/lac/solver_cg.h index e64e31e569..56aa07b154 100644 --- a/include/deal.II/lac/solver_cg.h +++ b/include/deal.II/lac/solver_cg.h @@ -449,12 +449,12 @@ SolverCG::solve (const MatrixType &A, // Should we build the matrix for // eigenvalue computations? const bool do_eigenvalues = !condition_number_signal.empty() - |!all_condition_numbers_signal.empty() - |!eigenvalues_signal.empty() - |!all_eigenvalues_signal.empty() - | additional_data.compute_condition_number - | additional_data.compute_all_condition_numbers - | additional_data.compute_eigenvalues; + ||!all_condition_numbers_signal.empty() + ||!eigenvalues_signal.empty() + ||!all_eigenvalues_signal.empty() + || additional_data.compute_condition_number + || additional_data.compute_all_condition_numbers + || additional_data.compute_eigenvalues; // vectors used for eigenvalue // computations diff --git a/include/deal.II/lac/solver_gmres.h b/include/deal.II/lac/solver_gmres.h index aa265d533e..8e65cd25c4 100644 --- a/include/deal.II/lac/solver_gmres.h +++ b/include/deal.II/lac/solver_gmres.h @@ -833,12 +833,12 @@ SolverGMRES::solve (const MatrixType &A, const bool do_eigenvalues= !condition_number_signal.empty() - |!all_condition_numbers_signal.empty() - |!eigenvalues_signal.empty() - |!all_eigenvalues_signal.empty() - |!hessenberg_signal.empty() - |!all_hessenberg_signal.empty() - |additional_data.compute_eigenvalues; + ||!all_condition_numbers_signal.empty() + ||!eigenvalues_signal.empty() + ||!all_eigenvalues_signal.empty() + ||!hessenberg_signal.empty() + ||!all_hessenberg_signal.empty() + ||additional_data.compute_eigenvalues; // for eigenvalue computation, need to collect the Hessenberg matrix (before // applying Givens rotations) FullMatrix H_orig;