]> git.donarmstrong.com Git - lilypond.git/blobdiff - flower/include/varray.hh
release: 0.0.62
[lilypond.git] / flower / include / varray.hh
index b9b1a24b6b6f69e41c2973a34ea5a6c9c135bb8c..4f67d3aac45d823301983eefb9c719739f9775a4 100644 (file)
@@ -156,6 +156,14 @@ public:
            thearray[i] = thearray[i-1];
        thearray[j] = k;
     }
+    /**
+      remove  i-th element, and return it.
+     */
+    T get(int i) {
+       T t = elem(i);
+       del (i);
+       return t;
+    }
     void del(int i) {
        assert(i >=0&& i < size_);
        arrcpy(thearray+i, thearray+i+1, size_-i-1);