From 48ff05ec62773116c77a6beb7d2cc4b86c526172 Mon Sep 17 00:00:00 2001 From: David Wells Date: Mon, 16 Jan 2023 13:09:42 -0500 Subject: [PATCH] Re-implement a compiler warning workaround --- source/grid/tria.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/grid/tria.cc b/source/grid/tria.cc index 78ca6cecbb..00740c5c45 100644 --- a/source/grid/tria.cc +++ b/source/grid/tria.cc @@ -5716,7 +5716,10 @@ namespace internal const std::array line_indices = TriaAccessorImplementation::Implementation:: get_line_indices_of_cell(*hex); - for (unsigned int l = 0; l < hex->n_lines(); ++l) + // avoid a compiler warning by fixing the max number of + // loop iterations to 12 + const unsigned int n_lines = std::min(hex->n_lines(), 12u); + for (unsigned int l = 0; l < n_lines; ++l) { raw_line_iterator line(&triangulation, 0, -- 2.39.5