Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-implement a compiler warning workaround #14687

Merged
merged 1 commit into from
Jan 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion source/grid/tria.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5716,7 +5716,10 @@ namespace internal
const std::array<unsigned int, 12> 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)
Comment on lines +5721 to +5722
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kronbichler What do you think? This was what you said last year: #14263 (comment)

{
raw_line_iterator line(&triangulation,
0,
Expand Down