]> https://gitweb.dealii.org/ - dealii.git/commitdiff
fix kinsol unused lambda capture warning 15481/head
authorTimo Heister <timo.heister@gmail.com>
Sun, 25 Jun 2023 18:43:43 +0000 (14:43 -0400)
committerTimo Heister <timo.heister@gmail.com>
Sun, 25 Jun 2023 19:25:09 +0000 (15:25 -0400)
source/sundials/kinsol.cc

index b0fbcd5044d70ebaa1e38b06a43e1255f7ac9a1a..e819db7c1a61a3aad2fceff678db3c28c840de29 100644 (file)
@@ -228,14 +228,12 @@ namespace SUNDIALS
 
     // helper function to create N_Vectors compatible with different versions
     // of SUNDIALS
-    const auto make_compatible_nvector_view = [this](auto &v) {
-      return internal::make_nvector_view(v
-#  if !DEAL_II_SUNDIALS_VERSION_LT(6, 0, 0)
-                                         ,
-                                         kinsol_ctx
+    const auto make_compatible_nvector_view =
+#  if DEAL_II_SUNDIALS_VERSION_LT(6, 0, 0)
+      [](auto &v) { return internal::make_nvector_view(v); };
+#  else
+      [this](auto &v) { return internal::make_nvector_view(v, kinsol_ctx); };
 #  endif
-      );
-    };
 
 
     VectorType ones;

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.