From 98fd74cad111f70cb16b1c3595118cfd86752c4e Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Fri, 15 Jun 2018 13:06:11 +0200 Subject: [PATCH] Fix unused variables in Debug mode --- .../numerics/error_estimator.templates.h | 11 ++++++---- source/numerics/error_estimator_1d.cc | 22 ++++++++++++------- 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/include/deal.II/numerics/error_estimator.templates.h b/include/deal.II/numerics/error_estimator.templates.h index 6357100cb1..2b8175afc7 100644 --- a/include/deal.II/numerics/error_estimator.templates.h +++ b/include/deal.II/numerics/error_estimator.templates.h @@ -1254,10 +1254,13 @@ KellyErrorEstimator::estimate( ExcIncompatibleNumberOfElements(solutions.size(), errors.size())); for (const auto &boundary_function : neumann_bc) - Assert(boundary_function.second->n_components == n_components, - ExcInvalidBoundaryFunction(boundary_function.first, - boundary_function.second->n_components, - n_components)); + { + (void)boundary_function; + Assert(boundary_function.second->n_components == n_components, + ExcInvalidBoundaryFunction(boundary_function.first, + boundary_function.second->n_components, + n_components)); + } Assert(component_mask.represents_n_components(n_components), ExcInvalidComponentMask()); diff --git a/source/numerics/error_estimator_1d.cc b/source/numerics/error_estimator_1d.cc index badb32ca89..f4aad3e062 100644 --- a/source/numerics/error_estimator_1d.cc +++ b/source/numerics/error_estimator_1d.cc @@ -349,10 +349,13 @@ KellyErrorEstimator<1, spacedim>::estimate( "value map.")); for (const auto boundary_function : neumann_bc) - Assert(boundary_function.second->n_components == n_components, - ExcInvalidBoundaryFunction(boundary_function.first, - boundary_function.second->n_components, - n_components)); + { + (void)boundary_function; + Assert(boundary_function.second->n_components == n_components, + ExcInvalidBoundaryFunction(boundary_function.first, + boundary_function.second->n_components, + n_components)); + } Assert(component_mask.represents_n_components(n_components), ExcInvalidComponentMask()); @@ -377,10 +380,13 @@ KellyErrorEstimator<1, spacedim>::estimate( ExcInvalidCoefficient()); for (const auto &boundary_function : neumann_bc) - Assert(boundary_function.second->n_components == n_components, - ExcInvalidBoundaryFunction(boundary_function.first, - boundary_function.second->n_components, - n_components)); + { + (void)boundary_function; + Assert(boundary_function.second->n_components == n_components, + ExcInvalidBoundaryFunction(boundary_function.first, + boundary_function.second->n_components, + n_components)); + } // reserve one slot for each cell and set it to zero for (unsigned int n = 0; n < n_solution_vectors; ++n) -- 2.39.5