Mercurial > forge
diff extra/NaN/src/str2array.cpp @ 12692:13815b367946 octave-forge
use size_t instead of mwSize/mwIndex whenever possible
author | schloegl |
---|---|
date | Sat, 12 Sep 2015 14:59:20 +0000 |
parents | b8b7b9fe9eb2 |
children | c76411f5c22e |
line wrap: on
line diff
--- a/extra/NaN/src/str2array.cpp Sat Sep 12 14:16:39 2015 +0000 +++ b/extra/NaN/src/str2array.cpp Sat Sep 12 14:59:20 2015 +0000 @@ -122,7 +122,8 @@ return(2); } } - else if (*endptr && !isspace(*endptr)) { + else //if (*endptr && !isspace(*endptr)) + { // conversion failed return(0); } @@ -131,9 +132,9 @@ void mexFunction( - int nlhs, /* number of expected outputs */ + mwSize nlhs, /* number of expected outputs */ mxArray *plhs[], /* array of pointers to output arguments */ - int nrhs, /* number of inputs */ + mwSize nrhs, /* number of inputs */ const mxArray *prhs[] /* array of pointers to input arguments */ ) @@ -200,7 +201,7 @@ } else { int typ = str2val(s, o+k, &ival); - if ((nlhs>2) && (typ==0)) mxSetCell(plhs[2], k, mxCreateString(s)); + if ((nlhs>2) && (typ==0)) mxSetCell(plhs[2], (mwSize)k, mxCreateString(s)); if ((nlhs>1) && (typ> 0)) v[k] = 0; if (typ==2) { if (mxGetPi(plhs[0])==NULL) {