mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
octave: Avoid deprecated single argument dim_vector constructor
The single argument constructor to dim_vector was deprecated in liboctave 3.4 [1], and gives a compile time warning when compiling with gcc and using a recent version of liboctave. The two argument constructor is safe to use with older versions of liboctave. [1] http://hg.savannah.gnu.org/hgweb/octave/rev/12884915a8e4
This commit is contained in:
parent
7b0b923d80
commit
b5ad0b9170
@ -52,7 +52,7 @@ void getActiveCellInfo(int32NDArray& activeCellInfo, const QString &hostName, qu
|
|||||||
|
|
||||||
activeCellCount = byteCount / sizeof(qint32);
|
activeCellCount = byteCount / sizeof(qint32);
|
||||||
|
|
||||||
dim_vector dv (2);
|
dim_vector dv (2, 1);
|
||||||
dv(0) = activeCellCount;
|
dv(0) = activeCellCount;
|
||||||
dv(1) = timestepCount;
|
dv(1) = timestepCount;
|
||||||
activeCellInfo.resize(dv);
|
activeCellInfo.resize(dv);
|
||||||
|
@ -51,7 +51,7 @@ void getMainGridDimensions(int32NDArray& gridDimensions, const QString &hostName
|
|||||||
socketStream >> jCount;
|
socketStream >> jCount;
|
||||||
socketStream >> kCount;
|
socketStream >> kCount;
|
||||||
|
|
||||||
dim_vector dv (1);
|
dim_vector dv (1, 1);
|
||||||
dv(0) = 3;
|
dv(0) = 3;
|
||||||
|
|
||||||
gridDimensions.resize(dv);
|
gridDimensions.resize(dv);
|
||||||
|
Loading…
Reference in New Issue
Block a user