]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.29
authorfred <fred>
Sun, 24 Mar 2002 19:30:46 +0000 (19:30 +0000)
committerfred <fred>
Sun, 24 Mar 2002 19:30:46 +0000 (19:30 +0000)
hdr/register.hh
src/break.cc
src/grouping.cc
src/scores.cc
src/slur.cc
src/stem.cc
src/wordwrap.cc

index 42574ed5bcc80f6fc90219d8693d805514db227e..e2b5167d8d0d405f70967708fc86bf5213606ff4 100644 (file)
@@ -7,7 +7,7 @@
 #ifndef REGISTER_HH
 #define REGISTER_HH
 #include "proto.hh"
-#include "sstack.hh"
+#include "varray.hh"
 
 /// data container.
 struct Staff_elem_info {
@@ -79,8 +79,8 @@ struct Notehead_register : Request_register {
 };
 
 struct Slur_register : Request_register {
-    sstack<Slur_req*> requests_arr_;
-    sstack<Slur *> slur_l_stack_;
+    Array<Slur_req*> requests_arr_;
+    Array<Slur *> slur_l_stack_;
     Array<Slur*> end_slur_l_arr_;
     
     /****************/
index a138049471a88a95bbf2e59b995caa0f8a2d8142..70ff864e9de23b1d46e70b00432e411cdfa967ce 100644 (file)
@@ -19,7 +19,7 @@ Break_algorithm::find_breaks() const
     for (iter_top(pscore_.cols,c); c.ok(); c++)
        if (c->breakable())
            retval.push(c);
-    assert(retval.last() == pscore_.cols.bottom().ptr());
+    assert(retval.top() == pscore_.cols.bottom().ptr());
     return retval;
 }
 
@@ -32,7 +32,7 @@ Break_algorithm::solve_line(Line_of_cols curline) const
    sp.add_column(curline[0], true, 0.0);
    for (int i=1; i< curline.size()-1; i++)
        sp.add_column(curline[i]);
-   sp.add_column(curline.last(), true, linelength);
+   sp.add_column(curline.top(), true, linelength);
 
    // misschien  moeven uit Spacing_problem? 
    for (iter_top(pscore_.suz,i); i.ok(); i++) {
@@ -41,8 +41,7 @@ Break_algorithm::solve_line(Line_of_cols curline) const
    Array<Real> the_sol=sp.solve();
    Col_hpositions col_hpos;
    col_hpos.cols = curline;
-   col_hpos.energy = the_sol.last();
-   the_sol.pop();
+   col_hpos.energy = the_sol.pop();
    col_hpos.config = the_sol;
    col_hpos.OK();
    return col_hpos;
index 91c9a66d0a7d6a78ed8152163021c609a7aabc1d..8c7e0e5d5b858e5ab1e986bfebfacefa76b04f7e 100644 (file)
@@ -38,7 +38,7 @@ Rhythmic_grouping::interval()const
     else
        return
            MInterval(children[0]->interval().left,
-                    children.last()->interval().right);
+                    children.top()->interval().right);
 }
 
 void
@@ -217,7 +217,7 @@ bool
 Rhythmic_grouping::child_fit_query(Moment start)
 {
     if (children.size())
-       return ( children.last()->interval().right== start);
+       return ( children.top()->interval().right== start);
 
     return true;
 }  
@@ -311,7 +311,7 @@ Rhythmic_grouping::extend(MInterval m)
        Array<Rhythmic_grouping*> a(children);
        for (int i=0; i < a.size(); i++) {
            a[i] =new Rhythmic_grouping(*children[i]);
-           a[i]->translate(children.last()->interval().right);     
+           a[i]->translate(children.top()->interval().right);      
        }
        children.concat(a);
     }
index 06a401fd82d3d26751f263afd6268d8dd2fcf4e6..59b6f6670deba01704e125f9336879341c479984 100644 (file)
@@ -33,7 +33,7 @@ Input_score*
 current_iscore_l()
 {
     if ( score_array_global.size() )
-       return score_array_global.last(); // UGH
+       return score_array_global.top(); // UGH
     else
        return 0;
 }
index bd1f4c3d1d8941f1c213f03811c298a4456c16e5..5b7f99d16ed4fb157de1cf6d1431f93cf71dc939 100644 (file)
@@ -22,7 +22,7 @@ Slur::Slur()
 Offset
 Slur::center() const
 {
-    int pos1 = encompass.last()->position;
+    int pos1 = encompass.top()->position;
     int pos2 = encompass[0]->position;
 
     int dy =  pos1-pos2;
@@ -58,7 +58,7 @@ Slur::set_default_dir()
 void
 Slur::do_pre_processing()
 {
-    right  = encompass.last()->pcol_l_;
+    right  = encompass.top()->pcol_l_;
     left = encompass[0]->pcol_l_;    
 }
 
@@ -101,7 +101,7 @@ Slur::brew_molecule_p() const
     assert(encompass.size()>0);        // todo
     
     Notehead *lnote_p =encompass[0];
-    Notehead *rnote_p =encompass.last();
+    Notehead *rnote_p =encompass.top();
     int lpos_i = lnote_p->position;
     int rpos_i = rnote_p->position;
     Offset  left_off(lnote_p->x_dir, lpos_i + 2*dir);
index fc5f9accb4be67c5c93c9ac10f2e39763f873b67..dc63e9e7eb8bc61270249380c672ea5ce1e321b2 100644 (file)
@@ -121,7 +121,7 @@ Stem::set_noteheads()
 {
     heads.sort(Notehead::compare);
     heads[0]->extremal = -1;
-    heads.last()->extremal = 1;
+    heads.top()->extremal = 1;
     int parity=1;
     int lastpos = heads[0]->position;
     for (int i=1; i < heads.size(); i ++) {
index cc114e9e5249852a69b6dd04466bfaffa50fa62b..469d2d1d293205919a0ce4b9b9020c37a4c0083a 100644 (file)
@@ -60,7 +60,7 @@ Word_wrap::solve()
 
 
            // add nobreak version of breakable column
-           current.cols.last()=breakpoints[break_idx_i];
+           current.cols.top()=breakpoints[break_idx_i];
            curcol ++;
            break_idx_i++;
        }