#11042 octave: Adjustments for updated API in version 7

Minor adjustments in data access for octave version 7. Previously used and verified version is octave 4.
This commit is contained in:
Magne Sjaastad
2024-01-11 08:27:04 +01:00
parent d065c8e1e0
commit 3f3ced5af0
4 changed files with 22 additions and 5 deletions

View File

@@ -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))
{