]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Mark some arguments as reference.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 9 Mar 2010 00:31:57 +0000 (00:31 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 9 Mar 2010 00:31:57 +0000 (00:31 +0000)
git-svn-id: https://svn.dealii.org/trunk@20754 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/include/base/numbers.h
deal.II/base/source/config.cc

index ea9eddc45c1e41fe0333cd9415a9562f1097bb46..acd0ae07580a822cb8dc4dda232072316e4c6d32 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 2006, 2007 by the deal.II authors
+//    Copyright (C) 2006, 2007, 2010 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -51,7 +51,7 @@ namespace numbers
                                    * array size, and the
                                    * like.
                                    */
-  static const unsigned int 
+  static const unsigned int
   invalid_unsigned_int = static_cast<unsigned int> (-1);
 
                                   /**
@@ -126,32 +126,32 @@ namespace numbers
   bool is_finite (const double x);
 
                                   /**
-                                   * Return @p true if real and 
+                                   * Return @p true if real and
                                    * imaginary parts of the given
                                    * complex number are finite.
                                    */
-  bool is_finite (const std::complex<double> x);
+  bool is_finite (const std::complex<double> &x);
 
                                   /**
-                                   * Return @p true if real and 
+                                   * Return @p true if real and
                                    * imaginary parts of the given
                                    * complex number are finite.
                                    */
-  bool is_finite (const std::complex<float> x);
-  
+  bool is_finite (const std::complex<float> &x);
+
                                   /**
-                                   * Return @p true if real and 
+                                   * Return @p true if real and
                                    * imaginary parts of the given
                                    * complex number are finite.
                                    *
                                    * Again may not work correctly if
-                                   * real or imaginary parts are very  
-                                   * large numbers that are infinite in 
-                                   * terms of <code>double</code>, but 
-                                   * finite with respect to 
+                                   * real or imaginary parts are very
+                                   * large numbers that are infinite in
+                                   * terms of <code>double</code>, but
+                                   * finite with respect to
                                    * <code>long double</code>.
                                    */
-  bool is_finite (const std::complex<long double> x);
+  bool is_finite (const std::complex<long double> &x);
 
                                   /**
                                    * A structure that, together with
@@ -182,7 +182,7 @@ namespace numbers
                                        * <code>false</code>.
                                        */
       static const bool is_complex = false;
-      
+
                                       /**
                                        * For this data type, typedef the
                                        * corresponding real type. Since the
@@ -247,7 +247,7 @@ namespace numbers
                                        * <code>true</code>.
                                        */
       static const bool is_complex = true;
-      
+
                                       /**
                                        * For this data type, typedef the
                                        * corresponding real type. Since this
@@ -287,7 +287,7 @@ namespace numbers
       static
       real_type abs (const std::complex<number> &x);
   };
-  
+
 }
 
 
@@ -357,10 +357,10 @@ namespace numbers
   {
     return std::norm (x);
   }
-  
+
 }
 
-  
+
 
 DEAL_II_NAMESPACE_CLOSE
 
index 9628f7f42d3d13d3b7eb10a679b5a3ad6859bce8..6a72a04e02cb2a4d741251af2d18802e782148be 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 2006, 2007 by the deal.II authors
+//    Copyright (C) 2006, 2007, 2010 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -19,9 +19,9 @@
 
 DEAL_II_NAMESPACE_OPEN
 
-namespace numbers 
+namespace numbers
 {
-  bool is_finite (const double x) 
+  bool is_finite (const double x)
   {
 #ifdef DEAL_II_HAVE_ISFINITE
     return std::isfinite (x);
@@ -37,33 +37,33 @@ namespace numbers
 
 
 
-  bool is_finite (const std::complex<double> x) 
+  bool is_finite (const std::complex<double> &x)
   {
                                        // Check complex numbers for infinity
                                        // by testing real and imaginary part
-    return ( is_finite (x.real()) 
-             && 
+    return ( is_finite (x.real())
+             &&
              is_finite (x.imag()) );
   }
 
 
 
-  bool is_finite (const std::complex<float> x) 
+  bool is_finite (const std::complex<float> &x)
   {
                                        // Check complex numbers for infinity
                                        // by testing real and imaginary part
-    return ( is_finite (x.real()) 
-             && 
+    return ( is_finite (x.real())
+             &&
              is_finite (x.imag()) );
   }
 
 
 
-  bool is_finite (const std::complex<long double> x) 
+  bool is_finite (const std::complex<long double> &x)
   {
                                        // Same for std::complex<long double>
-    return ( is_finite (x.real()) 
-             && 
+    return ( is_finite (x.real())
+             &&
              is_finite (x.imag()) );
   }
 
@@ -78,7 +78,7 @@ namespace numbers
   template struct NumberTraits<double>;
   template struct NumberTraits<float>;
   template struct NumberTraits<long double>;
-    
+
   template struct NumberTraits<std::complex<double> >;
   template struct NumberTraits<std::complex<float> >;
   template struct NumberTraits<std::complex<long double> >;

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.