]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.49
authorfred <fred>
Sun, 24 Mar 2002 19:38:11 +0000 (19:38 +0000)
committerfred <fred>
Sun, 24 Mar 2002 19:38:11 +0000 (19:38 +0000)
flower/.version
flower/NEWS
flower/include/assoc.hh

index ddcbb111b978b2d382cb39ba1d7f2667b8335610..53a4af6a089909a9fdd357c53c17769f13c4f99d 100644 (file)
@@ -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"
 #
index 629d06e5ddfdbf078f066787f642d3e8901ab896..1f489e042f2f67d29dc0ca143645c8859ecbfb57 100644 (file)
@@ -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
index bf22881d90bbb57f28d1748bc42cab47b300c954..b40d68661f4e21b9c2701870b28af0ce95459c87 100644 (file)
@@ -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;
     }
 };