From 51b2e49e08901fd649f8cc13b8ba1d33166e413f Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Fri, 18 Nov 2016 17:49:45 +0100 Subject: Improve consts in matlab undocumented function declarations --- matlab/mex/mexDataManagerHelpFunctions.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/matlab/mex/mexDataManagerHelpFunctions.cpp b/matlab/mex/mexDataManagerHelpFunctions.cpp index 1794abb..95d4640 100644 --- a/matlab/mex/mexDataManagerHelpFunctions.cpp +++ b/matlab/mex/mexDataManagerHelpFunctions.cpp @@ -42,10 +42,10 @@ $Id$ #ifdef USE_MATLAB_UNDOCUMENTED extern "C" { mxArray *mxCreateSharedDataCopy(const mxArray *pr); -bool mxUnshareArray(const mxArray *pr, const bool noDeepCopy); -mxArray *mxUnreference(const mxArray *pr); +bool mxUnshareArray(mxArray *pr, bool noDeepCopy); +mxArray *mxUnreference(mxArray *pr); #if 0 -// Unsupported in Matlab R2014b +// Unsupported in Matlab R2014b and later bool mxIsSharedArray(const mxArray *pr); #endif } @@ -66,12 +66,12 @@ public: // First unshare the input array, so that we may modify it. if (bUnshare) { #if 0 - // Unsupported in Matlab R2014b + // Unsupported in Matlab R2014b and later if (mxIsSharedArray(_pArray)) { fprintf(stderr, "Performance note: unsharing shared array in link\n"); } #endif - mxUnshareArray(_pArray, false); + mxUnshareArray(const_cast(_pArray), false); //fprintf(stderr, "Unshared:\narray: %p\tdata: %p\n", (void*)_pArray, (void*)mxGetData(_pArray)); } // Then create a (persistent) copy so the data won't be deleted -- cgit v1.2.3