From c7efc2d059c15fca0c6dcb08f8ad3863d6643ca3 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Thu, 13 Feb 2014 22:39:38 +0000 Subject: [PATCH] [Matlab] Fix detection of errors when importing Kinetics Cast the unsigned return type of newKineticsFromXML to a signed type so that the check on the Matlab side (which looks at the sign of the return value) can detect and report errors. Cherry-pick of trunk r2724. --- src/matlab/kineticsmethods.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/matlab/kineticsmethods.cpp b/src/matlab/kineticsmethods.cpp index 43ac2e28b..9c20162e5 100644 --- a/src/matlab/kineticsmethods.cpp +++ b/src/matlab/kineticsmethods.cpp @@ -24,7 +24,7 @@ void kineticsmethods(int nlhs, mxArray* plhs[], int in2 = getInt(prhs[5]); int in3 = getInt(prhs[6]); int in4 = getInt(prhs[7]); - vv = (double) newKineticsFromXML(root, iph, in1, in2, in3, in4); + vv = static_cast(newKineticsFromXML(root, iph, in1, in2, in3, in4)); plhs[0] = mxCreateNumericMatrix(1,1,mxDOUBLE_CLASS,mxREAL); double* h = mxGetPr(plhs[0]); *h = vv;