# HG changeset patch # User jwe # Date 1145214601 0 # Node ID 80409c2defcc16d68460956508a53bb1adf64220 # Parent 2d055c8fa019c214581f4857d07588e71e53bd8e [project @ 2006-04-16 19:10:00 by jwe] diff --git a/liboctave/ChangeLog b/liboctave/ChangeLog --- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,11 @@ +2006-04-16 John W. Eaton + + * kpse.cc (kpse_hash): Rename from hash. + (hash_lookup): Call kpse_hash instead of hash. + + * SparseType.cc (SparseType::SparseType): Use std::vector + to avoid local array with variable dimension. + 2006-04-13 David Bateman * Sparse.cc (assign (Sparse&, const Sparse&)): diff --git a/liboctave/SparseType.cc b/liboctave/SparseType.cc --- a/liboctave/SparseType.cc +++ b/liboctave/SparseType.cc @@ -89,7 +89,7 @@ if (tmp_typ == SparseType::Permuted_Diagonal) { - bool found [nrows]; + std::vector 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 found (nrows); for (octave_idx_type j = 0; j < i; j++) found [j] = true; diff --git a/liboctave/kpse.cc b/liboctave/kpse.cc --- 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)