Mercurial > octave-nkf
diff src/ov-cell.cc @ 8150:283989f2da9b
make null assignment matlab compatible
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Fri, 26 Sep 2008 11:52:01 -0400 |
parents | 12a68443191c |
children | 7cbe01c21986 |
line wrap: on
line diff
--- a/src/ov-cell.cc Thu Sep 25 13:44:51 2008 -0400 +++ b/src/ov-cell.cc Fri Sep 26 11:52:01 2008 -0400 @@ -230,8 +230,8 @@ if (t_rhs.is_cell ()) octave_base_matrix<Cell>::assign (i, t_rhs.cell_value ()); else - if (t_rhs.is_empty ()) - octave_base_matrix<Cell>::assign (i, Cell()); + if (t_rhs.is_null_value ()) + octave_base_matrix<Cell>::delete_elements (i); else octave_base_matrix<Cell>::assign (i, Cell (t_rhs)); @@ -263,7 +263,8 @@ octave_base_matrix<Cell>::assign (i, tmp_cell); } else - octave_base_matrix<Cell>::assign (i, Cell (t_rhs)); + // Regularize a null matrix if stored into a struct component. + octave_base_matrix<Cell>::assign (i, Cell (t_rhs.non_null_value ())); if (! error_state) {