From e3578030656392270b92be80198fea5859fb8a2f Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Sat, 26 Jan 2019 17:35:22 +0100 Subject: [PATCH] Use default destructor and avoid constructor to be defaulted --- include/deal.II/lac/trilinos_precondition.h | 2 +- source/lac/trilinos_precondition_muelu.cc | 17 +++++++---------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/include/deal.II/lac/trilinos_precondition.h b/include/deal.II/lac/trilinos_precondition.h index 0b75cd92a8..cb6d2ee11b 100644 --- a/include/deal.II/lac/trilinos_precondition.h +++ b/include/deal.II/lac/trilinos_precondition.h @@ -1783,7 +1783,7 @@ namespace TrilinosWrappers /** * Destructor. */ - ~PreconditionAMGMueLu() override; + virtual ~PreconditionAMGMueLu() override = default; /** * Let Trilinos compute a multilevel hierarchy for the solution of a diff --git a/source/lac/trilinos_precondition_muelu.cc b/source/lac/trilinos_precondition_muelu.cc index cbaa3124a4..3a26b73462 100644 --- a/source/lac/trilinos_precondition_muelu.cc +++ b/source/lac/trilinos_precondition_muelu.cc @@ -55,19 +55,16 @@ namespace TrilinosWrappers PreconditionAMGMueLu::PreconditionAMGMueLu() { + // clang-tidy wants to default the constructor if we disable the check + // in case we compile without 64-bit indices # ifdef DEAL_II_WITH_64BIT_INDICES - AssertThrow(false, + constexpr bool enabled = false; +# else + constexpr bool enabled = true; +# endif + AssertThrow(enabled, ExcMessage( "PreconditionAMGMueLu does not support 64bit-indices!")); -# endif - } - - - - PreconditionAMGMueLu::~PreconditionAMGMueLu() - { - preconditioner.reset(); - trilinos_matrix.reset(); } -- 2.39.5