Skip to content
Snippets Groups Projects
Commit ccd8368c authored by Christoph Grüninger's avatar Christoph Grüninger
Browse files

solverfactorytest: range-based for loops with const references

This is less about performance and mor about silencing
the Clazy warnings.
Found by Clazy (range-loop-reference)
parent f05ed2b5
No related branches found
No related tags found
No related merge requests found
......@@ -60,7 +60,7 @@ void testSeq(const Dune::ParameterTree& config, Comm c){
using Operator = Dune::MatrixAdapter<Matrix, Vector, Vector>;
std::shared_ptr<Operator> op = std::make_shared<Operator>(mat);
for(std::string test : config.getSubKeys()){
for(const std::string& test : config.getSubKeys()){
Dune::ParameterTree solverConfig = config.sub(test);
std::cout << " ============== " << test << " ============== " << std::endl;
try{
......@@ -96,7 +96,7 @@ void testOverlapping(const Dune::ParameterTree& config, Comm c){
std::shared_ptr<Operator> op = std::make_shared<Operator>(mat, comm);
for(std::string test : config.getSubKeys()){
for(const std::string& test : config.getSubKeys()){
Dune::ParameterTree solverConfig = config.sub(test);
std::cout << " ============== " << test << " ============== " << std::endl;
try{
......@@ -131,7 +131,7 @@ void testNonoverlapping(const Dune::ParameterTree& config, Comm c){
std::shared_ptr<Operator> op = std::make_shared<Operator>(mat, comm);
for(std::string test : config.getSubKeys()){
for(const std::string& test : config.getSubKeys()){
Dune::ParameterTree solverConfig = config.sub(test);
std::cout << " ============== " << test << " ============== " << std::endl;
try{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment