]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Make variables const and thus Intel C++ compiler more happy.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 16 May 2001 11:22:49 +0000 (11:22 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 16 May 2001 11:22:49 +0000 (11:22 +0000)
git-svn-id: https://svn.dealii.org/trunk@4616 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/include/base/polynomial.h
deal.II/base/source/function_time.cc
deal.II/base/source/table_handler.cc
deal.II/lac/include/lac/block_indices.h
deal.II/lac/include/lac/block_vector.h
deal.II/lac/include/lac/full_matrix.templates.h

index ff327658ee472c02b94adf039f5959acbb3c7883..5153321895b1ecad0c44a4501e36020850fb73da 100644 (file)
@@ -200,7 +200,7 @@ class Legendre : public Polynomial<number>
                                     /**
                                      * Compute coefficients recursively.
                                      */
-    static void compute_coefficients (unsigned int k);
+    static void compute_coefficients (const unsigned int k);
     
                                     /**
                                      * Get coefficients for
index 5d6a38a81255d6e922503a229cbec927c6a6cee0..f808d1ddd0cd7db5e8e4bdc4a1721deb42a8ef77 100644 (file)
@@ -15,7 +15,7 @@
 #include <base/function_time.h>
 
 
-FunctionTime::FunctionTime(double initial_time)
+FunctionTime::FunctionTime(const double initial_time)
                :
                time(initial_time)
 {}
index c9d8df265ea15b951a20f97ee0da1f907b2d7ca5..c9d239a54f8557be086f14508691270bb092195b 100644 (file)
@@ -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<std::string>;
 
 
 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);
 
 
index 6c8be8cfffe388e9a22fe565ff26ae0372fb5300..ffda2c5b57cf1ce8dc668d1108bc6f3dd322e080 100644 (file)
@@ -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)
index 91019eea36d859ecbe96a6b8e0d87360faad38c6..fa06d9a20bd5fdfceb57061629ab505e73b208d3 100644 (file)
@@ -560,8 +560,8 @@ Number& BlockVector<Number>::operator() (const unsigned int i)
 
 template <typename Number>
 inline
-Vector<Number>&
-BlockVector<Number>::block(unsigned int i)
+Vector<Number> &
+BlockVector<Number>::block (const unsigned int i)
 {
   Assert(i<num_blocks, ExcIndexRange(i,0,num_blocks));
 
@@ -572,8 +572,8 @@ BlockVector<Number>::block(unsigned int i)
 
 template <typename Number>
 inline
-const Vector<Number>&
-BlockVector<Number>::block(unsigned int i) const
+const Vector<Number> &
+BlockVector<Number>::block (const unsigned int i) const
 {
   Assert(i<num_blocks, ExcIndexRange(i,0,num_blocks));
 
index 58cec6898498fe1d52065485997fa42ac95a7e38..9126c9fa8464ccfbb5351005871df15ad931b092 100644 (file)
@@ -1375,10 +1375,12 @@ void
 FullMatrix<number>::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());
   

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.