Skip to content

Commit b31f8f2

Browse files
committed
minor improvement to code
1 parent 0f1e98b commit b31f8f2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/boot.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,13 @@ void mexFunction (int nlhs, mxArray* plhs[],
9191
if ( mxIsComplex (prhs[0]) ) {
9292
mexErrMsgTxt ("The first input argument (N) cannot contain an imaginary part.");
9393
}
94-
if ( *x != int(*x) ) {
94+
if ( *x != static_cast<int>(*x) ) {
9595
mexErrMsgTxt ("The value of the first input argument (N) must be a positive integer.");
9696
}
9797
if ( !mxIsFinite (*x) ) {
9898
mexErrMsgTxt ("The first input argument (N) cannot be NaN or Inf.");
9999
}
100-
n = *x;
100+
n = static_cast<int>(*x);
101101
}
102102
if ( !mxIsClass (prhs[0], "double") ) {
103103
mexErrMsgTxt ("The first input argument (N or X) must be of type double.");

0 commit comments

Comments
 (0)