From 31f03adc41b681e85ef9cd665e3e863baab34ca9 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Wed, 16 May 2001 11:22:49 +0000 Subject: [PATCH] Make variables const and thus Intel C++ compiler more happy. git-svn-id: https://svn.dealii.org/trunk@4616 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/base/include/base/polynomial.h | 2 +- deal.II/base/source/function_time.cc | 2 +- deal.II/base/source/table_handler.cc | 12 ++++++------ deal.II/lac/include/lac/block_indices.h | 2 +- deal.II/lac/include/lac/block_vector.h | 8 ++++---- deal.II/lac/include/lac/full_matrix.templates.h | 4 +++- 6 files changed, 16 insertions(+), 14 deletions(-) diff --git a/deal.II/base/include/base/polynomial.h b/deal.II/base/include/base/polynomial.h index ff327658ee..5153321895 100644 --- a/deal.II/base/include/base/polynomial.h +++ b/deal.II/base/include/base/polynomial.h @@ -200,7 +200,7 @@ class Legendre : public Polynomial /** * Compute coefficients recursively. */ - static void compute_coefficients (unsigned int k); + static void compute_coefficients (const unsigned int k); /** * Get coefficients for diff --git a/deal.II/base/source/function_time.cc b/deal.II/base/source/function_time.cc index 5d6a38a812..f808d1ddd0 100644 --- a/deal.II/base/source/function_time.cc +++ b/deal.II/base/source/function_time.cc @@ -15,7 +15,7 @@ #include -FunctionTime::FunctionTime(double initial_time) +FunctionTime::FunctionTime(const double initial_time) : time(initial_time) {} diff --git a/deal.II/base/source/table_handler.cc b/deal.II/base/source/table_handler.cc index c9d8df265e..c9d239a54f 100644 --- a/deal.II/base/source/table_handler.cc +++ b/deal.II/base/source/table_handler.cc @@ -191,7 +191,7 @@ void TableHandler::set_tex_format (const std::string &key, void TableHandler::set_precision (const std::string &key, - unsigned int precision) + const unsigned int precision) { Assert(columns.count(key), ExcColumnNotExistent(key)); columns[key].precision=precision; @@ -199,7 +199,7 @@ void TableHandler::set_precision (const std::string &key, void TableHandler::set_scientific (const std::string &key, - bool scientific) + const bool scientific) { Assert(columns.count(key), ExcColumnNotExistent(key)); columns[key].scientific=scientific; @@ -459,15 +459,15 @@ template class TableEntry; template -void TableHandler::add_value(const std::string &, double); +void TableHandler::add_value(const std::string &, const double); template -void TableHandler::add_value(const std::string &, int); +void TableHandler::add_value(const std::string &, const int); template -void TableHandler::add_value(const std::string &, unsigned int); +void TableHandler::add_value(const std::string &, const unsigned int); template -void TableHandler::add_value(const std::string &, std::string); +void TableHandler::add_value(const std::string &, const std::string); diff --git a/deal.II/lac/include/lac/block_indices.h b/deal.II/lac/include/lac/block_indices.h index 6c8be8cfff..ffda2c5b57 100644 --- a/deal.II/lac/include/lac/block_indices.h +++ b/deal.II/lac/include/lac/block_indices.h @@ -153,7 +153,7 @@ class BlockIndices /* ---------------------- template and inline functions ------------------- */ inline -BlockIndices::BlockIndices (unsigned int n_blocks) +BlockIndices::BlockIndices (const unsigned int n_blocks) : n_blocks(n_blocks), start_indices(n_blocks+1) diff --git a/deal.II/lac/include/lac/block_vector.h b/deal.II/lac/include/lac/block_vector.h index 91019eea36..fa06d9a20b 100644 --- a/deal.II/lac/include/lac/block_vector.h +++ b/deal.II/lac/include/lac/block_vector.h @@ -560,8 +560,8 @@ Number& BlockVector::operator() (const unsigned int i) template inline -Vector& -BlockVector::block(unsigned int i) +Vector & +BlockVector::block (const unsigned int i) { Assert(i::block(unsigned int i) template inline -const Vector& -BlockVector::block(unsigned int i) const +const Vector & +BlockVector::block (const unsigned int i) const { Assert(i::print_formatted (std::ostream &out, const unsigned int precision, const bool scientific, - unsigned int width, + const unsigned int width_, const char *zero_string, const double denominator) const { + unsigned int width = width_; + Assert ((val != 0) || (dim_range+dim_image==0), ExcInternalError()); -- 2.39.5