]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Work around a (wrong) warning about an unused variable. 12957/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Tue, 16 Nov 2021 17:37:18 +0000 (10:37 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Wed, 17 Nov 2021 18:29:57 +0000 (11:29 -0700)
include/deal.II/matrix_free/evaluation_kernels.h

index b358f9b68e5c61ecdc2cf2f1a1d2aa2a5ff41ad0..0532e46907e03ada13ace0c969fe6cfd0048c59c 100644 (file)
@@ -152,18 +152,18 @@ namespace internal
       const internal::MatrixFreeFunctions::UnivariateShapeData<Number>
         *univariate_shape_data)
     {
-      const bool request_even_odd = variant == evaluate_evenodd;
-
-      Eval eval(request_even_odd ? univariate_shape_data->shape_values_eo :
-                                   univariate_shape_data->shape_values,
-                request_even_odd ? univariate_shape_data->shape_gradients_eo :
-                                   univariate_shape_data->shape_gradients,
-                request_even_odd ? univariate_shape_data->shape_hessians_eo :
-                                   univariate_shape_data->shape_hessians,
-                univariate_shape_data->fe_degree + 1,
-                univariate_shape_data->n_q_points_1d);
-
-      return eval;
+      if (variant == evaluate_evenodd)
+        return Eval(univariate_shape_data->shape_values_eo,
+                    univariate_shape_data->shape_gradients_eo,
+                    univariate_shape_data->shape_hessians_eo,
+                    univariate_shape_data->fe_degree + 1,
+                    univariate_shape_data->n_q_points_1d);
+      else
+        return Eval(univariate_shape_data->shape_values,
+                    univariate_shape_data->shape_gradients,
+                    univariate_shape_data->shape_hessians,
+                    univariate_shape_data->fe_degree + 1,
+                    univariate_shape_data->n_q_points_1d);
     }
   };
 

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.