]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Convert an input argument with default value into a const reference.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 10 Aug 2012 08:27:28 +0000 (08:27 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 10 Aug 2012 08:27:28 +0000 (08:27 +0000)
git-svn-id: https://svn.dealii.org/trunk@25852 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/dofs/dof_tools.h
deal.II/source/dofs/dof_tools.cc
deal.II/source/dofs/dof_tools.inst.in

index 0f6212e786825aeed021b856e7735c6a132a6faa..6207efca1caea2d4aca843b0c4755b5850ba85ff 100644 (file)
@@ -2100,7 +2100,7 @@ namespace DoFTools
   void
   count_dofs_per_block (const DH &dof,
                         std::vector<unsigned int> &dofs_per_block,
-                        std::vector<unsigned int>  target_block
+                        const std::vector<unsigned int>  &target_block
                           = std::vector<unsigned int>());
 
                                    /**
index 06c07598f031bd459b2e5c980e8964950f711bd8..c1204f1f433f45eecc63457589d6e2d9a22d8cbc 100644 (file)
@@ -4872,8 +4872,10 @@ namespace DoFTools
   void
   count_dofs_per_block (const DH &dof_handler,
                         std::vector<unsigned int> &dofs_per_block,
-                        std::vector<unsigned int>  target_block)
+                        const std::vector<unsigned int>  &target_block_)
   {
+    std::vector<unsigned int>  target_block = target_block_;
+
     const dealii::hp::FECollection<DH::dimension,DH::space_dimension>
       fe_collection (dof_handler.get_fe());
     Assert (fe_collection.size() < 256, ExcNotImplemented());
index 5d7124b652a1c58b5a5afa681b15054a196ff562..8564f052f09ac07210d609eeb3778146dc5ab9d2 100644 (file)
@@ -763,19 +763,22 @@ template
 void
 DoFTools::count_dofs_per_block<DoFHandler<deal_II_dimension> > (
   const DoFHandler<deal_II_dimension>&,
-  std::vector<unsigned int>&, std::vector<unsigned int>);
+  std::vector<unsigned int>&,
+  const std::vector<unsigned int> &);
 
 template
 void
 DoFTools::count_dofs_per_block<hp::DoFHandler<deal_II_dimension> > (
   const hp::DoFHandler<deal_II_dimension>&,
-  std::vector<unsigned int>&, std::vector<unsigned int>);
+  std::vector<unsigned int>&,
+  const std::vector<unsigned int> &);
 
 template
 void
 DoFTools::count_dofs_per_block<MGDoFHandler<deal_II_dimension> > (
   const MGDoFHandler<deal_II_dimension>&,
-  std::vector<unsigned int>&, std::vector<unsigned int>);
+  std::vector<unsigned int>&,
+  const std::vector<unsigned int> &);
 
 template
 void
@@ -896,19 +899,22 @@ template
 void
 DoFTools::count_dofs_per_block<DoFHandler<deal_II_dimension,deal_II_dimension+1> > (
   const DoFHandler<deal_II_dimension,deal_II_dimension+1>&,
-  std::vector<unsigned int>&, std::vector<unsigned int>);
+  std::vector<unsigned int>&,
+  const std::vector<unsigned int> &);
 
 template
 void
 DoFTools::count_dofs_per_block<hp::DoFHandler<deal_II_dimension,deal_II_dimension+1> > (
   const hp::DoFHandler<deal_II_dimension,deal_II_dimension+1>&,
-  std::vector<unsigned int>&, std::vector<unsigned int>);
+  std::vector<unsigned int>&,
+  const std::vector<unsigned int> &);
 
 template
 void
 DoFTools::count_dofs_per_block<MGDoFHandler<deal_II_dimension,deal_II_dimension+1> > (
   const MGDoFHandler<deal_II_dimension,deal_II_dimension+1>&,
-  std::vector<unsigned int>&, std::vector<unsigned int>);
+  std::vector<unsigned int>&,
+  const std::vector<unsigned int> &);
 
 #endif
 
@@ -926,19 +932,22 @@ template
 void
 DoFTools::count_dofs_per_block<DoFHandler<1,3> > (
   const DoFHandler<1,3>&,
-  std::vector<unsigned int>&, std::vector<unsigned int>);
+  std::vector<unsigned int>&,
+  const std::vector<unsigned int> &);
 
 template
 void
 DoFTools::count_dofs_per_block<hp::DoFHandler<1,3> > (
   const hp::DoFHandler<1,3>&,
-  std::vector<unsigned int>&, std::vector<unsigned int>);
+  std::vector<unsigned int>&,
+  const std::vector<unsigned int> &);
 
 template
 void
 DoFTools::count_dofs_per_block<MGDoFHandler<1,3> > (
   const MGDoFHandler<1,3>&,
-  std::vector<unsigned int>&, std::vector<unsigned int>);
+  std::vector<unsigned int>&,
+  const std::vector<unsigned int> &);
 
 #endif
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.