Fix MSVC warning C4290 by removing exception specifications
This commit is contained in:
parent
9c2ec3862b
commit
e5d4b58e2a
3 changed files with 9 additions and 12 deletions
|
|
@ -40,7 +40,7 @@ namespace mdp {
|
||||||
* @param tmp number to be checked
|
* @param tmp number to be checked
|
||||||
*/
|
*/
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
void checkFinite(const double tmp) throw(std::range_error) {
|
void checkFinite(const double tmp) {
|
||||||
if (_finite(tmp)) {
|
if (_finite(tmp)) {
|
||||||
if(_isnan(tmp)) {
|
if(_isnan(tmp)) {
|
||||||
printf("ERROR: we have encountered a nan!\n");
|
printf("ERROR: we have encountered a nan!\n");
|
||||||
|
|
@ -54,7 +54,7 @@ namespace mdp {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
void checkFinite(const double tmp) throw(std::range_error) {
|
void checkFinite(const double tmp) {
|
||||||
if (! finite(tmp)) {
|
if (! finite(tmp)) {
|
||||||
if(isnan(tmp)) {
|
if(isnan(tmp)) {
|
||||||
printf("ERROR: we have encountered a nan!\n");
|
printf("ERROR: we have encountered a nan!\n");
|
||||||
|
|
@ -91,7 +91,7 @@ namespace mdp {
|
||||||
* @param tmp Number to be checked
|
* @param tmp Number to be checked
|
||||||
* @param trigger bounds on the number. Defaults to 1.0E20
|
* @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);
|
checkFinite(tmp);
|
||||||
if (fabs(tmp) >= trigger) {
|
if (fabs(tmp) >= trigger) {
|
||||||
char sbuf[64];
|
char sbuf[64];
|
||||||
|
|
@ -109,7 +109,7 @@ namespace mdp {
|
||||||
* @param tmp number to be checked
|
* @param tmp number to be checked
|
||||||
*/
|
*/
|
||||||
#ifdef WIN32
|
#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) || (! _finite(tmp))) {
|
||||||
if (tmp == 0.0) {
|
if (tmp == 0.0) {
|
||||||
printf("ERROR: we have encountered a zero!\n");
|
printf("ERROR: we have encountered a zero!\n");
|
||||||
|
|
@ -127,7 +127,7 @@ void checkZeroFinite(const double tmp) throw(std::range_error) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#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) || (! finite(tmp))) {
|
||||||
if (tmp == 0.0) {
|
if (tmp == 0.0) {
|
||||||
printf("ERROR: we have encountered a zero!\n");
|
printf("ERROR: we have encountered a zero!\n");
|
||||||
|
|
|
||||||
|
|
@ -58,9 +58,7 @@ namespace mdp {
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|
||||||
static void mdp_alloc_eh(const char * const rname, const int bytes)
|
static void mdp_alloc_eh(const char * const rname, const int bytes)
|
||||||
throw(std::bad_alloc, std::exception)
|
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
*
|
*
|
||||||
* mdp_alloc_eh:
|
* mdp_alloc_eh:
|
||||||
|
|
|
||||||
|
|
@ -699,13 +699,13 @@ namespace mdp {
|
||||||
*
|
*
|
||||||
* @param tmp number to be checked
|
* @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.
|
//! Utility routine to check to see that a number is finite.
|
||||||
/*!
|
/*!
|
||||||
* @param tmp number to be checked
|
* @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
|
//! Utility routine to link checkFinte() to fortran program
|
||||||
/*!
|
/*!
|
||||||
|
|
@ -725,8 +725,7 @@ namespace mdp {
|
||||||
* @param tmp Number to be checked
|
* @param tmp Number to be checked
|
||||||
* @param trigger bounds on the number. Defaults to 1.0E20
|
* @param trigger bounds on the number. Defaults to 1.0E20
|
||||||
*/
|
*/
|
||||||
extern void checkMagnitude(const double tmp, const double trigger = 1.0E20)
|
extern void checkMagnitude(const double tmp, const double trigger = 1.0E20);
|
||||||
throw(std::range_error);
|
|
||||||
|
|
||||||
} /* end of mdp namespace */
|
} /* end of mdp namespace */
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue