From c9f6cf3966e1de7ce66a971b2763d3e1e3f749b3 Mon Sep 17 00:00:00 2001 From: fred Date: Fri, 1 Nov 1996 16:48:30 +0000 Subject: [PATCH] lilypond-0.0.6 --- staff.cc | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/staff.cc b/staff.cc index 7dd2666dc9..8b5c0782c5 100644 --- a/staff.cc +++ b/staff.cc @@ -3,6 +3,20 @@ #include "sccol.hh" #include "debug.hh" +Staff::Staff(Staff const&src) +{ + PL_copy(voices,src.voices); + PL_copy(commands,src.commands); + assert(!cols.size()); // cols is a runtime field. + + score_ = src.score_; + pscore_ = src.pscore_; +} + +Paperdef* +Staff::paper() const{ + return score_->paper_; +} void Staff::clean_cols() @@ -23,7 +37,7 @@ Staff::get_col(Real w, bool mus) assert(sc->when == w); PCursor stc(cols); for (; stc.ok(); stc++) { - if (*sc < *stc->score_column) + if (*stc->score_column > *sc) // too far break; if (sc == stc->score_column) return stc; @@ -131,7 +145,8 @@ Staff::OK() const Real -Staff::last() const { +Staff::last() const +{ Real l = 0.0; for (PCursor vc(voices); vc.ok(); vc++) { l = MAX(l, vc->last()); @@ -143,20 +158,18 @@ Staff::last() const { void Staff::print() const { - #ifndef NPRINT - +#ifndef NPRINT mtor << "Staff {\n"; for (PCursor vc(voices); vc.ok(); vc++) { vc->print(); } mtor <<"}\n"; - #endif +#endif } Staff::Staff() { score_ =0; - pscore_=0; - + pscore_=0; } -- 2.39.5