Mercurial > hg > octave-terminal
changeset 10761:12dfe91e9fab
more bkw compatibility for octave_map
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Thu, 01 Jul 2010 09:31:54 +0200 |
parents | 76079e505f9d |
children | d53eb6249892 |
files | src/ChangeLog src/oct-map.h |
diffstat | 2 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2010-07-01 Jaroslav Hajek <highegg@gmail.com> + + * oct-map.h (octave_scalar_map::assign (const std::string&, const + octave_value&), octave_map::assign (const std::string&, const Cell&)): + Backward-compatible aliases for setfield. + 2010-07-01 Jaroslav Hajek <highegg@gmail.com> * oct-map.cc (octave_fields::equal_up_to_order (const octave_fields&,
--- a/src/oct-map.h +++ b/src/oct-map.h @@ -214,6 +214,8 @@ // set contents of a given field. add if not exist. void setfield (const std::string& key, const octave_value& val); + void assign (const std::string& k, const octave_value& val) + { setfield (k, val); } // remove a given field. do nothing if not exist. void rmfield (const std::string& key); @@ -336,6 +338,8 @@ // set contents of a given field. add if not exist. checks for // correct dimensions. void setfield (const std::string& key, const Cell& val); + void assign (const std::string& k, const Cell& val) + { setfield (k, val); } // remove a given field. do nothing if not exist. void rmfield (const std::string& key);