From dd8e0a0772d6eba5a36afb48ee7cd9f72d42f139 Mon Sep 17 00:00:00 2001 From: Oliver Sander <oliver.sander@tu-dresden.de> Date: Tue, 26 Jan 2016 06:38:34 +0100 Subject: [PATCH] Use the 'auto' keyword some more --- dune/foamgrid/foamgrid/foamgrid.cc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/dune/foamgrid/foamgrid/foamgrid.cc b/dune/foamgrid/foamgrid/foamgrid.cc index 39a2dfb..6c99c62 100644 --- a/dune/foamgrid/foamgrid/foamgrid.cc +++ b/dune/foamgrid/foamgrid/foamgrid.cc @@ -541,8 +541,7 @@ void Dune::FoamGrid<dimgrid, dimworld>::refineSimplexElement(FoamGridEntityImp<2 array<FoamGridEntityImp<1, dimgrid, dimworld>*, 9> nextLevelFacets; std::size_t facetIndex=0; #ifndef NDEBUG - const Dune::ReferenceElement<double, dimgrid>& refElement - = Dune::ReferenceElements<double, dimgrid>::general(element.type()); + const auto& refElement = Dune::ReferenceElements<double, dimgrid>::general(element.type()); #endif // I am just to dumb for a general facet to vertice mapping. @@ -555,9 +554,8 @@ void Dune::FoamGrid<dimgrid, dimworld>::refineSimplexElement(FoamGridEntityImp<2 for(FacetIterator facet=element.facet_.begin(); facet != element.facet_.end(); ++facet) { #ifndef NDEBUG - typedef FoamGridEntityImp<0, dimgrid, dimworld> FoamGridVertex; - const FoamGridVertex* v0 = element.vertex_[refElement.subEntity(facetIndex/2, 1, 0, 2)]; - const FoamGridVertex* v1 = element.vertex_[refElement.subEntity(facetIndex/2, 1, 1, 2)]; + const auto* v0 = element.vertex_[refElement.subEntity(facetIndex/2, 1, 0, 2)]; + const auto* v1 = element.vertex_[refElement.subEntity(facetIndex/2, 1, 1, 2)]; #endif if(!(*facet)->nSons_) -- GitLab