From d37d7ffe485ae95efd1b83acf6a68c1978f9e49b Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Tue, 9 Aug 2016 12:44:27 -0500 Subject: [PATCH] Fix signature of our rand/srand implementations. Since these are functions in our own namespace -- that happen to have the same names as ones in the std:: namespace, but really independent -- there is no reason not to use our own conventions. Specifically: - make input arguments 'const' - remove the deprecated 'throw()' specification. --- tests/tests.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/tests.h b/tests/tests.h index d8ae920990..f258dcb65f 100644 --- a/tests/tests.h +++ b/tests/tests.h @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2015 by the deal.II authors +// Copyright (C) 2004 - 2016 by the deal.II authors // // This file is part of the deal.II library. // @@ -98,7 +98,8 @@ number get_real_assert_zero_imag(const number &a) // we put this into a namespace to not conflict with stdlib namespace Testing { - int rand(bool reseed=false, int seed=1) throw() + int rand(const bool reseed=false, + const int seed=1) { static int r[32]; static int k; @@ -138,7 +139,7 @@ namespace Testing } // reseed our random number generator - void srand(int seed) throw() + void srand(const int seed) { rand(true, seed); } -- 2.39.5