From: fred Date: Sun, 24 Mar 2002 19:38:11 +0000 (+0000) Subject: lilypond-0.0.49 X-Git-Tag: release/1.5.59~5022 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=a1c2045361054022f69e23f2db7b265cea042264;p=lilypond.git lilypond-0.0.49 --- diff --git a/flower/.version b/flower/.version index ddcbb111b9..53a4af6a08 100644 --- a/flower/.version +++ b/flower/.version @@ -1,6 +1,6 @@ MAJOR_VERSION = 1 MINOR_VERSION = 1 -PATCH_LEVEL = 10 +PATCH_LEVEL = 11 # use to send patches, always empty for released version: MY_PATCH_LEVEL = # include separator: "-1" or ".a" # diff --git a/flower/NEWS b/flower/NEWS index 629d06e5dd..1f489e042f 100644 --- a/flower/NEWS +++ b/flower/NEWS @@ -1,3 +1,7 @@ +pl 1.1.11 + - template<> class P + - assoc elem() methods + pl 1.1.10 - Matrix_storage naming - Matrix_storage::try_right_multiply to help speed up diff --git a/flower/include/assoc.hh b/flower/include/assoc.hh index bf22881d90..b40d68661f 100644 --- a/flower/include/assoc.hh +++ b/flower/include/assoc.hh @@ -53,11 +53,11 @@ struct Assoc { return arr.size() -1; } public: - bool elt_query(K key) const { + bool elt_b(K key) const { return find(key) >= 0; } void del(K key) { - assert(elt_query(key)); + assert(elt_b(key)); int i= find(key); arr[i].free = true; } @@ -66,11 +66,17 @@ public: int i = find_creat(key); arr[i].val = val; } - V& operator[](K key) { + V& elem(K key) { return arr[find_creat(key)].val; + } + V& operator[](K key) { + return elem(key); } V const & operator[](K key) const { - assert(elt_query(key)); + return elem(key); + } + V const & elem(K key) const { + assert(elt_b(key)); return arr[find(key)].val; } };