From: Wolfgang Bangerth Date: Thu, 9 Feb 2006 21:15:14 +0000 (+0000) Subject: Mark some variables as const, if they are input parameters. X-Git-Tag: v8.0.0~12391 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2eddc66e8b900089d8b4cb070f644bf709cce2c0;p=dealii.git Mark some variables as const, if they are input parameters. git-svn-id: https://svn.dealii.org/trunk@12288 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/include/dofs/dof_tools.h b/deal.II/deal.II/include/dofs/dof_tools.h index 0e9f26fa27..5576444119 100644 --- a/deal.II/deal.II/include/dofs/dof_tools.h +++ b/deal.II/deal.II/include/dofs/dof_tools.h @@ -803,7 +803,7 @@ class DoFTools extract_dofs (const DoFHandler &dof_handler, const std::vector &select, std::vector &selected_dofs, - bool blocks = false); + const bool blocks = false); /** * Do the same thing as @@ -816,7 +816,7 @@ class DoFTools const MGDoFHandler &dof, const std::vector &select, std::vector &selected_dofs, - bool blocks = false); + const bool blocks = false); /** * Extract all degrees of freedom diff --git a/deal.II/deal.II/source/dofs/dof_tools.cc b/deal.II/deal.II/source/dofs/dof_tools.cc index f6172f7a15..f54525037b 100644 --- a/deal.II/deal.II/source/dofs/dof_tools.cc +++ b/deal.II/deal.II/source/dofs/dof_tools.cc @@ -1736,11 +1736,11 @@ DoFTools::extract_dofs ( const DoFHandler &dof, const std::vector &component_select, std::vector &selected_dofs, - bool count_by_blocks) + const bool count_by_blocks) { const FiniteElement &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 local_selected_dofs (fe.dofs_per_cell, false); for (unsigned int i=0; i &dof, const std::vector &component_select, std::vector &selected_dofs, - bool count_by_blocks) + const bool count_by_blocks) { const FiniteElement& 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 local_selected_dofs (fe.dofs_per_cell, false); for (unsigned int i=0; i