]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.45
authorfred <fred>
Sun, 24 Mar 2002 19:36:53 +0000 (19:36 +0000)
committerfred <fred>
Sun, 24 Mar 2002 19:36:53 +0000 (19:36 +0000)
lily/include/score.hh
lily/staff.cc

index 293801a98e499420e0a3348bc6e046fa188159b4..cf86ad342a7a8ca4f28cf12398b98ccae8aa9dbf 100644 (file)
@@ -71,7 +71,7 @@ private:
     void paper();
 
     // utils:
-    PCursor<Score_column*> create_cols(Moment);
+    PCursor<Score_column*> create_cols(Moment, PCursor<Score_column*> &last);
 
     Score(Score const&){}
 
index 31cba7801f99e39c19b87fa420f69684bae4638b..b23f163d29fd8f8eb4886e93178d31de2be56628 100644 (file)
@@ -6,9 +6,6 @@
   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
 */
 
-
-
 #include "proto.hh"
 #include "plist.hh"
 #include "staff.hh"
@@ -23,6 +20,8 @@
 #include "command-request.hh" // todo
 #include "midi-stream.hh"
 #include "pqueue.hh"
+
+
 void
 Staff::add(PointerList<Voice*> const &l)
 {
@@ -94,9 +93,9 @@ void
 Staff::setup_staffcols()
 {
     PQueue<Subtle_req *, Moment> subtle_req_pq;
+       PCursor<Staff_column*> last(cols_);
     
     for (iter_top(voice_list_,i); i.ok(); i++) {
-       PCursor<Staff_column*> last(cols_);
        Moment now = i->start;
        iter_top(i->elts,j);
        while( j.ok()) {
@@ -113,14 +112,13 @@ Staff::setup_staffcols()
            }
            if(next == now) {
                s_l->add(j, subtle_req_pq); 
-               now += j->duration;
+               now += j->duration_;
                j++;
            }
        }
        
     }
-    PCursor<Staff_column*> last(cols_);
-    
+   last = cols_.top(); 
     while (subtle_req_pq.size()) {
        Moment front =subtle_req_pq.front_idx();
        Staff_column *s_l = get_col(front, &last);
@@ -128,7 +126,6 @@ Staff::setup_staffcols()
            s_l->setup_one_request(subtle_req_pq.get()); // ugh!
     }
        
-    OK();
 }
 
 void