From: Timo Heister Date: Thu, 21 Nov 2013 15:44:42 +0000 (+0000) Subject: fix exception specification for rand() in tests X-Git-Tag: v8.1.0~220 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9d72cf62e1b79120acd127fd9b32c9bd5f740555;p=dealii.git fix exception specification for rand() in tests git-svn-id: https://svn.dealii.org/trunk@31746 0785d39b-7218-0410-832d-ea1e28bc413d --- 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); }