From e5d4b58e2a5e86bf7a311b4e54f4df4dcb3d4cd2 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Tue, 17 Jan 2012 04:12:19 +0000 Subject: [PATCH] Fix MSVC warning C4290 by removing exception specifications --- Cantera/src/base/checkFinite.cpp | 10 +++++----- Cantera/src/base/mdp_allo.cpp | 4 +--- Cantera/src/base/mdp_allo.h | 7 +++---- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/Cantera/src/base/checkFinite.cpp b/Cantera/src/base/checkFinite.cpp index f0c7e2629..8747268e1 100644 --- a/Cantera/src/base/checkFinite.cpp +++ b/Cantera/src/base/checkFinite.cpp @@ -40,7 +40,7 @@ namespace mdp { * @param tmp number to be checked */ #ifdef WIN32 - void checkFinite(const double tmp) throw(std::range_error) { + void checkFinite(const double tmp) { if (_finite(tmp)) { if(_isnan(tmp)) { printf("ERROR: we have encountered a nan!\n"); @@ -54,7 +54,7 @@ namespace mdp { } } #else - void checkFinite(const double tmp) throw(std::range_error) { + void checkFinite(const double tmp) { if (! finite(tmp)) { if(isnan(tmp)) { printf("ERROR: we have encountered a nan!\n"); @@ -91,7 +91,7 @@ namespace mdp { * @param tmp Number to be checked * @param trigger bounds on the number. Defaults to 1.0E20 */ - void checkMagnitude(const double tmp, const double trigger) throw(std::range_error) { + void checkMagnitude(const double tmp, const double trigger) { checkFinite(tmp); if (fabs(tmp) >= trigger) { char sbuf[64]; @@ -109,7 +109,7 @@ namespace mdp { * @param tmp number to be checked */ #ifdef WIN32 -void checkZeroFinite(const double tmp) throw(std::range_error) { +void checkZeroFinite(const double tmp) { if ((tmp == 0.0) || (! _finite(tmp))) { if (tmp == 0.0) { printf("ERROR: we have encountered a zero!\n"); @@ -127,7 +127,7 @@ void checkZeroFinite(const double tmp) throw(std::range_error) { } } #else - void checkZeroFinite(const double tmp) throw(std::range_error) { + void checkZeroFinite(const double tmp) { if ((tmp == 0.0) || (! finite(tmp))) { if (tmp == 0.0) { printf("ERROR: we have encountered a zero!\n"); diff --git a/Cantera/src/base/mdp_allo.cpp b/Cantera/src/base/mdp_allo.cpp index f43766010..5e0785dd1 100644 --- a/Cantera/src/base/mdp_allo.cpp +++ b/Cantera/src/base/mdp_allo.cpp @@ -58,9 +58,7 @@ namespace mdp { /****************************************************************************/ /****************************************************************************/ - static void mdp_alloc_eh(const char * const rname, const int bytes) - throw(std::bad_alloc, std::exception) - + static void mdp_alloc_eh(const char * const rname, const int bytes) /************************************************************************* * * mdp_alloc_eh: diff --git a/Cantera/src/base/mdp_allo.h b/Cantera/src/base/mdp_allo.h index 958c22db8..027c268a4 100644 --- a/Cantera/src/base/mdp_allo.h +++ b/Cantera/src/base/mdp_allo.h @@ -699,13 +699,13 @@ namespace mdp { * * @param tmp number to be checked */ - extern void checkZeroFinite(const double tmp) throw(std::range_error); + extern void checkZeroFinite(const double tmp); //! Utility routine to check to see that a number is finite. /*! * @param tmp number to be checked */ - extern void checkFinite(const double tmp) throw(std::range_error); + extern void checkFinite(const double tmp); //! Utility routine to link checkFinte() to fortran program /*! @@ -725,8 +725,7 @@ namespace mdp { * @param tmp Number to be checked * @param trigger bounds on the number. Defaults to 1.0E20 */ - extern void checkMagnitude(const double tmp, const double trigger = 1.0E20) - throw(std::range_error); + extern void checkMagnitude(const double tmp, const double trigger = 1.0E20); } /* end of mdp namespace */ /****************************************************************************/