Skip to content

Commit

Permalink
minor improvement to code
Browse files Browse the repository at this point in the history
  • Loading branch information
acp29 committed Feb 10, 2025
1 parent 0f1e98b commit b31f8f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/boot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ void mexFunction (int nlhs, mxArray* plhs[],
if ( mxIsComplex (prhs[0]) ) {
mexErrMsgTxt ("The first input argument (N) cannot contain an imaginary part.");
}
if ( *x != int(*x) ) {
if ( *x != static_cast<int>(*x) ) {
mexErrMsgTxt ("The value of the first input argument (N) must be a positive integer.");
}
if ( !mxIsFinite (*x) ) {
mexErrMsgTxt ("The first input argument (N) cannot be NaN or Inf.");
}
n = *x;
n = static_cast<int>(*x);
}
if ( !mxIsClass (prhs[0], "double") ) {
mexErrMsgTxt ("The first input argument (N or X) must be of type double.");
Expand Down

0 comments on commit b31f8f2

Please sign in to comment.