]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Mark some variables as const, if they are input parameters.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 9 Feb 2006 21:15:14 +0000 (21:15 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 9 Feb 2006 21:15:14 +0000 (21:15 +0000)
git-svn-id: https://svn.dealii.org/trunk@12288 0785d39b-7218-0410-832d-ea1e28bc413d

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

index 0e9f26fa27314faf9977d9b05a7c853246542d33..5576444119b5bd15c50f1a4b5057b9214edd4624 100644 (file)
@@ -803,7 +803,7 @@ class DoFTools
     extract_dofs (const DoFHandler<dim>   &dof_handler,
                  const std::vector<bool> &select,
                  std::vector<bool>       &selected_dofs,
-                 bool blocks = false);
+                 const bool               blocks = false);
 
                                     /**
                                      * Do the same thing as
@@ -816,7 +816,7 @@ class DoFTools
                        const MGDoFHandler<dim> &dof,
                        const std::vector<bool> &select,
                        std::vector<bool>       &selected_dofs,
-                       bool blocks = false);
+                       const bool               blocks = false);
 
                                     /**
                                      * Extract all degrees of freedom
index f6172f7a1518e40b7ac184cde43e231707218f0c..f54525037b7e8afa46d99a7a60754a590d7f88c0 100644 (file)
@@ -1736,11 +1736,11 @@ DoFTools::extract_dofs (
   const DoFHandler<dim>   &dof,
   const std::vector<bool> &component_select,
   std::vector<bool>       &selected_dofs,
-  bool count_by_blocks)
+  const bool               count_by_blocks)
 {
   const FiniteElement<dim> &fe = dof.get_fe();
   
-  if (count_by_blocks)
+  if (count_by_blocks == true)
     {
       Assert(component_select.size() == fe.n_blocks(),
             ExcDimensionMismatch(component_select.size(), fe.n_blocks()));
@@ -1781,7 +1781,7 @@ DoFTools::extract_dofs (
                                    // something interesting or not
   std::vector<bool> local_selected_dofs (fe.dofs_per_cell, false);
   for (unsigned int i=0; i<fe.dofs_per_cell; ++i)
-    if (count_by_blocks)
+    if (count_by_blocks == true)
       local_selected_dofs[i]
         = component_select[fe.system_to_block_index(i).first];
     else
@@ -1850,11 +1850,11 @@ DoFTools::extract_level_dofs(
   const MGDoFHandler<dim> &dof,
   const std::vector<bool> &component_select,
   std::vector<bool>       &selected_dofs,
-  bool count_by_blocks)
+  const bool               count_by_blocks)
 {
   const FiniteElement<dim>& fe = dof.get_fe();
   
-  if (count_by_blocks)
+  if (count_by_blocks == true)
     {
       Assert(component_select.size() == fe.n_blocks(),
             ExcDimensionMismatch(component_select.size(), fe.n_blocks()));
@@ -1894,7 +1894,7 @@ DoFTools::extract_level_dofs(
                                    // something interesting or not
   std::vector<bool> local_selected_dofs (fe.dofs_per_cell, false);
   for (unsigned int i=0; i<fe.dofs_per_cell; ++i)
-    if (count_by_blocks)
+    if (count_by_blocks == true)
       local_selected_dofs[i]
         = component_select[fe.system_to_block_index(i).first];
     else

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.