From d8e452a94d28077d70ac5cf9d23f5d8f0e9e949e Mon Sep 17 00:00:00 2001 From: heister Date: Thu, 21 Nov 2013 15:44:42 +0000 Subject: [PATCH] fix exception specification for rand() in tests git-svn-id: https://svn.dealii.org/trunk@31746 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/tests.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/tests/tests.h b/tests/tests.h index c7cf65ac83..bcc14d635e 100644 --- a/tests/tests.h +++ b/tests/tests.h @@ -36,7 +36,7 @@ // Cygwin has a different implementation for rand() which causes many tests to fail. // This here is a reimplementation that gives the same sequence of numbers as a program // that uses rand() on a typical linux machine. -int myrand(bool reseed=false, int seed=1) +int myrand(bool reseed=false, int seed=1) throw() { static int r[32]; static int k; @@ -76,20 +76,17 @@ int myrand(bool reseed=false, int seed=1) } // reseed our random number generator -void mysrand(int seed) +void mysrand(int seed) throw() { myrand(true, seed); } - -// I hope this is safe to just override the standard -// rand() functions here. -int rand() +int rand() throw() { return myrand(); } -void srand(int seed) +void srand(int seed) throw() { mysrand(seed); } -- 2.39.5