From 2eddc66e8b900089d8b4cb070f644bf709cce2c0 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Thu, 9 Feb 2006 21:15:14 +0000 Subject: [PATCH] Mark some variables as const, if they are input parameters. git-svn-id: https://svn.dealii.org/trunk@12288 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/include/dofs/dof_tools.h | 4 ++-- deal.II/deal.II/source/dofs/dof_tools.cc | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) 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