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

Use more curly brace initialization in return statements. #5286

Merged
merged 1 commit into from
Jul 13, 2023
Merged
Show file tree
Hide file tree
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
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