Skip to content

Commit

Permalink
silence warning
Browse files Browse the repository at this point in the history
the warning with GCC 12.3.0
loop variable 'm' creates a copy from type 'const std::pair<const int, {anonymous}::MeshData>' [-Werror=range-loop-construct]
  • Loading branch information
cwsmith authored and joshia5 committed Sep 8, 2024
1 parent 60c507f commit 60bb929
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mds/mdsCGNS.cc
Original file line number Diff line number Diff line change
Expand Up @@ -177,19 +177,19 @@ struct MeshDataGroup
if (components.size() == 1)
{
std::cout << "Scalar Group has " << components.size() << " related componenets: " << std::endl;
for (const auto m : components)
for (const auto& m : components)
std::cout << "Field " << m.second.name << " @ " << m.second.si << " " << m.second.fi << std::endl;
}
else if (components.size() == 3)
{
std::cout << "Vector Group has " << components.size() << " related componenets: " << std::endl;
for (const auto m : components)
for (const auto& m : components)
std::cout << "Field " << m.second.name << " @ " << m.second.si << " " << m.second.fi << std::endl;
}
else if (components.size() == 9)
{
std::cout << "Matrix Group has " << components.size() << " related componenets: " << std::endl;
for (const auto m : components)
for (const auto& m : components)
std::cout << "Field " << m.second.name << " @ " << m.second.si << " " << m.second.fi << std::endl;
}
else
Expand Down

0 comments on commit 60bb929

Please sign in to comment.