]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use default destructor and avoid constructor to be defaulted 7643/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Sat, 26 Jan 2019 16:35:22 +0000 (17:35 +0100)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Sat, 26 Jan 2019 16:35:22 +0000 (17:35 +0100)
include/deal.II/lac/trilinos_precondition.h
source/lac/trilinos_precondition_muelu.cc

index 0b75cd92a8b3ade437d3ddf5f0355b8a93fd5758..cb6d2ee11b6297f8131a03c3f729d85ead49f72c 100644 (file)
@@ -1783,7 +1783,7 @@ namespace TrilinosWrappers
     /**
      * Destructor.
      */
-    ~PreconditionAMGMueLu() override;
+    virtual ~PreconditionAMGMueLu() override = default;
 
     /**
      * Let Trilinos compute a multilevel hierarchy for the solution of a
index cbaa3124a40a934241aff1d3458b903e8f460a89..3a26b73462e1a15f4ff31646176bf4d5c1c3cd1a 100644 (file)
@@ -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();
   }
 
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.