Fix MSVC warning C4290 by removing exception specifications

This commit is contained in:
Ray Speth 2012-01-17 04:12:19 +00:00
parent 9c2ec3862b
commit e5d4b58e2a
3 changed files with 9 additions and 12 deletions

View file

@ -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");

View file

@ -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:

View file

@ -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 */
/****************************************************************************/