From 8026df30d28fed99f3353086e179d5cb1c33e04b Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Tue, 26 Jun 2018 02:28:23 +0200 Subject: [PATCH] Avoid warning for an unused variable in step-20 --- examples/step-20/step-20.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/examples/step-20/step-20.cc b/examples/step-20/step-20.cc index c14df6ea6c..8710392aca 100644 --- a/examples/step-20/step-20.cc +++ b/examples/step-20/step-20.cc @@ -253,8 +253,13 @@ namespace Step20 void KInverse::value_list(const std::vector> &points, std::vector> & values) const { - Assert(points.size() == values.size(), - ExcDimensionMismatch(points.size(), values.size())); + // The value we are going to store for a given point does not depend on its + // coordinates and we use the `points` object only for checking that the + // `values` object has the correct size. In release mode, `AssertDimension` + // is defined empty and the compiler will complain that the `points` object + // is unused. The following line silences this warning. + (void)points; + AssertDimension(points.size(), values.size()); for (auto &value : values) { -- 2.39.5