Mercurial > hg > octave-lojdl
changeset 5764:80409c2defcc
[project @ 2006-04-16 19:10:00 by jwe]
author | jwe |
---|---|
date | Sun, 16 Apr 2006 19:10:01 +0000 |
parents | 2d055c8fa019 |
children | 7ba9ad1fec11 |
files | liboctave/ChangeLog liboctave/SparseType.cc liboctave/kpse.cc |
diffstat | 3 files changed, 12 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,11 @@ +2006-04-16 John W. Eaton <jwe@octave.org> + + * kpse.cc (kpse_hash): Rename from hash. + (hash_lookup): Call kpse_hash instead of hash. + + * SparseType.cc (SparseType::SparseType): Use std::vector<bool> + to avoid local array with variable dimension. + 2006-04-13 David Bateman <dbateman@free.fr> * Sparse.cc (assign (Sparse<LT>&, const Sparse<RT>&)):
--- a/liboctave/SparseType.cc +++ b/liboctave/SparseType.cc @@ -89,7 +89,7 @@ if (tmp_typ == SparseType::Permuted_Diagonal) { - bool found [nrows]; + std::vector<bool> found (nrows); for (octave_idx_type j = 0; j < i; j++) found [j] = true; @@ -414,7 +414,7 @@ if (tmp_typ == SparseType::Permuted_Diagonal) { - bool found [nrows]; + std::vector<bool> found (nrows); for (octave_idx_type j = 0; j < i; j++) found [j] = true;
--- a/liboctave/kpse.cc +++ b/liboctave/kpse.cc @@ -359,7 +359,7 @@ }; static unsigned -hash (hash_table_type table, const std::string& key) +kpse_hash (hash_table_type table, const std::string& key) { unsigned n = 0; @@ -380,7 +380,7 @@ { hash_element_type *p; string_vector ret; - unsigned n = hash (table, key); + unsigned n = kpse_hash (table, key); /* Look at everything in this bucket. */ for (p = table.buckets[n]; p; p = p->next)