diff --git a/OctavePlugin/riGetActiveCellInfo.cpp b/OctavePlugin/riGetActiveCellInfo.cpp index 8b389d0704..3644c96c6c 100644 --- a/OctavePlugin/riGetActiveCellInfo.cpp +++ b/OctavePlugin/riGetActiveCellInfo.cpp @@ -63,7 +63,12 @@ void getActiveCellInfo(int32NDArray& activeCellInfo, const QString &hostName, qu return; } - qint32* internalMatrixData = (qint32*)activeCellInfo.fortran_vec()->mex_get_data(); +#if OCTAVE_MAJOR_VERSION > 6 + auto internalMatrixData = (qint32*)activeCellInfo.fortran_vec(); +#else + auto internalMatrixData = (qint32*)activeCellInfo.fortran_vec()->mex_get_data(); +#endif + QStringList errorMessages; if (!RiaSocketDataTransfer::readBlockDataFromSocket(&socket, (char*)(internalMatrixData), columnCount * byteCountForOneTimestep, errorMessages)) { diff --git a/OctavePlugin/riGetSelectedCells.cpp b/OctavePlugin/riGetSelectedCells.cpp index 6c5783f3fa..b38e253185 100644 --- a/OctavePlugin/riGetSelectedCells.cpp +++ b/OctavePlugin/riGetSelectedCells.cpp @@ -63,7 +63,12 @@ void getSelectedCells(int32NDArray& selectedCellInfo, const QString &hostName, q return; } - qint32* internalMatrixData = (qint32*)selectedCellInfo.fortran_vec()->mex_get_data(); +#if OCTAVE_MAJOR_VERSION > 6 + auto internalMatrixData = (qint32*)selectedCellInfo.fortran_vec(); +#else + auto internalMatrixData = (qint32*)selectedCellInfo.fortran_vec()->mex_get_data(); +#endif + QStringList errorMessages; if (!RiaSocketDataTransfer::readBlockDataFromSocket(&socket, (char*)(internalMatrixData), columnCount * byteCountForOneTimestep, errorMessages)) { diff --git a/OctavePlugin/riSetActiveCellProperty.cpp b/OctavePlugin/riSetActiveCellProperty.cpp index 1d52ec2944..a1e9f5eb48 100644 --- a/OctavePlugin/riSetActiveCellProperty.cpp +++ b/OctavePlugin/riSetActiveCellProperty.cpp @@ -54,7 +54,11 @@ void setEclipseProperty(const Matrix& propertyFrames, const QString &hostName, q socketStream << (qint64)(timeStepCount); socketStream << (qint64)timeStepByteCount; - const double* internalData = propertyFrames.fortran_vec(); +#if OCTAVE_MAJOR_VERSION > 6 + auto internalData = propertyFrames.data(); +#else + auto internalData = propertyFrames.fortran_vec(); +#endif QStringList errorMessages; if (!RiaSocketDataTransfer::writeBlockDataToSocket(&socket, (const char *)internalData, timeStepByteCount*timeStepCount, errorMessages)) @@ -135,7 +139,6 @@ DEFUN_DLD (riSetActiveCellProperty, args, nargout, Matrix propertyFrames = args(0).matrix_value(); - dim_vector mxDims = propertyFrames.dims(); if (mxDims.length() != 2) { diff --git a/OctavePlugin/riSetGridProperty.cpp b/OctavePlugin/riSetGridProperty.cpp index 5a4db5c2e4..b7ba632889 100644 --- a/OctavePlugin/riSetGridProperty.cpp +++ b/OctavePlugin/riSetGridProperty.cpp @@ -71,7 +71,11 @@ void setEclipseProperty(const NDArray& propertyFrames, const QString &hostName, socketStream << (qint64)(timeStepCount); socketStream << (qint64)singleTimeStepByteCount; - const double* internalData = propertyFrames.fortran_vec(); +#if OCTAVE_MAJOR_VERSION > 6 + auto internalData = propertyFrames.data(); +#else + auto internalData = propertyFrames.fortran_vec(); +#endif QStringList errorMessages; if (!RiaSocketDataTransfer::writeBlockDataToSocket(&socket, (const char *)internalData, timeStepCount*singleTimeStepByteCount, errorMessages))