Mercurial > hg > octave-nkf
changeset 10744:4716e2e17118
fix octave_map::extract_scalar
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Wed, 23 Jun 2010 13:58:04 +0200 |
parents | cb3ed842bd30 |
children | 9f4eac2fa26c |
files | src/oct-map.cc src/oct-map.h |
diffstat | 2 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/oct-map.cc +++ b/src/oct-map.cc @@ -345,9 +345,8 @@ octave_idx_type idx) const { octave_idx_type nf = nfields (); - dest.vals.reserve (nf); for (octave_idx_type i = 0; i < nf; i++) - dest.vals.push_back (vals[i](idx)); + dest.vals[i] = vals[i](idx); } octave_scalar_map
--- a/src/oct-map.h +++ b/src/oct-map.h @@ -317,7 +317,7 @@ // remove a given field. do nothing if not exist. void rmfield (const std::string& key); - void del (const std::string& key) { rmfield (key); } + void del (const std::string& k) { rmfield (k); } // return a copy with fields ordered, optionally along with permutation. octave_map orderfields (void) const;