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:
Torstein Hegge 2013-03-14 19:49:11 +01:00
parent 7b0b923d80
commit b5ad0b9170
2 changed files with 2 additions and 2 deletions

View File

@ -52,7 +52,7 @@ void getActiveCellInfo(int32NDArray& activeCellInfo, const QString &hostName, qu
activeCellCount = byteCount / sizeof(qint32);
dim_vector dv (2);
dim_vector dv (2, 1);
dv(0) = activeCellCount;
dv(1) = timestepCount;
activeCellInfo.resize(dv);

View File

@ -51,7 +51,7 @@ void getMainGridDimensions(int32NDArray& gridDimensions, const QString &hostName
socketStream >> jCount;
socketStream >> kCount;
dim_vector dv (1);
dim_vector dv (1, 1);
dv(0) = 3;
gridDimensions.resize(dv);