From 9f53f59caa4858779d95572e853a0398695319c8 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Tue, 9 Mar 2010 00:31:57 +0000 Subject: [PATCH] Mark some arguments as reference. git-svn-id: https://svn.dealii.org/trunk@20754 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/base/include/base/numbers.h | 36 ++++++++++++++--------------- deal.II/base/source/config.cc | 26 ++++++++++----------- 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/deal.II/base/include/base/numbers.h b/deal.II/base/include/base/numbers.h index ea9eddc45c..acd0ae0758 100644 --- a/deal.II/base/include/base/numbers.h +++ b/deal.II/base/include/base/numbers.h @@ -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 (-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 x); + bool is_finite (const std::complex &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 x); - + bool is_finite (const std::complex &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 double, but - * finite with respect to + * real or imaginary parts are very + * large numbers that are infinite in + * terms of double, but + * finite with respect to * long double. */ - bool is_finite (const std::complex x); + bool is_finite (const std::complex &x); /** * A structure that, together with @@ -182,7 +182,7 @@ namespace numbers * false. */ static const bool is_complex = false; - + /** * For this data type, typedef the * corresponding real type. Since the @@ -247,7 +247,7 @@ namespace numbers * true. */ 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 &x); }; - + } @@ -357,10 +357,10 @@ namespace numbers { return std::norm (x); } - + } - + DEAL_II_NAMESPACE_CLOSE diff --git a/deal.II/base/source/config.cc b/deal.II/base/source/config.cc index 9628f7f42d..6a72a04e02 100644 --- a/deal.II/base/source/config.cc +++ b/deal.II/base/source/config.cc @@ -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 x) + bool is_finite (const std::complex &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 x) + bool is_finite (const std::complex &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 x) + bool is_finite (const std::complex &x) { // Same for std::complex - return ( is_finite (x.real()) - && + return ( is_finite (x.real()) + && is_finite (x.imag()) ); } @@ -78,7 +78,7 @@ namespace numbers template struct NumberTraits; template struct NumberTraits; template struct NumberTraits; - + template struct NumberTraits >; template struct NumberTraits >; template struct NumberTraits >; -- 2.39.5