Skip to content

Commit

Permalink
Merge pull request #5286 from bangerth/curly-brace
Browse files Browse the repository at this point in the history
Use more curly brace initialization in return statements.
  • Loading branch information
bobmyhill committed Jul 13, 2023
2 parents d45857d + fdd23c9 commit 7d26d00
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions source/geometry_model/interface.cc
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ namespace aspect
Interface<dim>::get_periodic_boundary_pairs() const
{
// return an empty set in the base class
return std::set<std::pair<std::pair<types::boundary_id, types::boundary_id>, unsigned int>>();
return {};
}


Expand Down Expand Up @@ -85,7 +85,7 @@ namespace aspect
Assert (false,
ExcMessage ("The cartesian_to_natural_coordinates function has "
"not been implemented in this geometry model."));
return std::array<double,dim>();
return {};
}


Expand Down
2 changes: 1 addition & 1 deletion source/particle/generator/interface.cc
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ namespace aspect
return std::make_pair(cell,particle);

// Avoid warnings about missing return
return std::pair<Particles::internal::LevelInd,Particle<dim>>();
return {};
}


Expand Down
2 changes: 1 addition & 1 deletion source/particle/property/interface.cc
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ namespace aspect
const typename parallel::distributed::Triangulation<dim>::active_cell_iterator &cell) const
{
if (property_information.n_components() == 0)
return std::vector<double>();
return {};

std::vector<double> particle_properties;
particle_properties.reserve(property_information.n_components());
Expand Down
2 changes: 1 addition & 1 deletion source/simulator/assemblers/interface.cc
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ namespace aspect
"then this function should be implemented. "
"If this is an assembler that does not have to compute a residual, it should not be called."));

return std::vector<double>();
return {};
}


Expand Down

0 comments on commit 7d26d00

Please sign in to comment.