Mercurial > hg > octave-terminal
changeset 11047:52609f73c7d9
__glpk__.cc: use octave_scalar_map instead of Octave_map
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 29 Sep 2010 04:01:22 -0400 |
parents | 14993c9e857e |
children | 10c65e01f042 |
files | src/ChangeLog src/DLD-FUNCTIONS/__glpk__.cc |
diffstat | 2 files changed, 16 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2010-09-29 John W. Eaton <jwe@octave.org> + + * DLD-FUNCTIONS/__glpk__.cc (F__glpk__): Use octave_scalar_map + instead of Octave_map. + (OCTAVE_GLPK_GET_REAL_PARAM, OCTAVE_GLPK_GET_INT_PARAM): + Update for octave_scalar_map. + 2010-09-29 John W. Eaton <jwe@octave.org> * DLD-FUNCTIONS/amd.cc (Famd): Use octave_scalar_map instead of
--- a/src/DLD-FUNCTIONS/__glpk__.cc +++ b/src/DLD-FUNCTIONS/__glpk__.cc @@ -418,13 +418,13 @@ #define OCTAVE_GLPK_GET_REAL_PARAM(NAME, IDX) \ do \ { \ - if (PARAM.contains (NAME)) \ + octave_value tmp = PARAM.contents (NAME); \ + \ + if (tmp.is_defined ()) \ { \ - Cell tmp = PARAM.contents (NAME); \ - \ if (! tmp.is_empty ()) \ { \ - lpxRealParam[IDX] = tmp(0).scalar_value (); \ + lpxRealParam[IDX] = tmp.scalar_value (); \ \ if (error_state) \ { \ @@ -444,13 +444,13 @@ #define OCTAVE_GLPK_GET_INT_PARAM(NAME, VAL) \ do \ { \ - if (PARAM.contains (NAME)) \ + octave_value tmp = PARAM.contents (NAME); \ + \ + if (tmp.is_defined ()) \ { \ - Cell tmp = PARAM.contents (NAME); \ - \ if (! tmp.is_empty ()) \ { \ - VAL = tmp(0).int_value (); \ + VAL = tmp.int_value (); \ \ if (error_state) \ { \ @@ -681,7 +681,7 @@ sense = -1; //-- 9th Input. A structure containing the control parameters. - Octave_map PARAM = args(8).map_value (); + octave_scalar_map PARAM = args(8).scalar_map_value (); if (error_state) {