From: fred Date: Wed, 27 Mar 2002 02:06:41 +0000 (+0000) Subject: lilypond-1.5.40 X-Git-Tag: release/1.5.59~270 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=b07369ef23fe5c4ddbb3901465f9af4d5d8c35c3;p=lilypond.git lilypond-1.5.40 --- diff --git a/flower/include/interval.hh b/flower/include/interval.hh index 8d4d83a5dc..12d940c048 100644 --- a/flower/include/interval.hh +++ b/flower/include/interval.hh @@ -42,6 +42,7 @@ struct Interval_t : public Drul_array { void intersect (Interval_t h); T length () const; + T delta () const; void set_empty () ; bool empty_b () const { return elem (LEFT) > elem (RIGHT); } bool contains_b (Interval_t const&) const; @@ -85,8 +86,7 @@ struct Interval_t : public Drul_array { elem (LEFT) = l; elem (RIGHT) =r; } -private: - + void swap () { T t = elem (LEFT); diff --git a/flower/include/interval.tcc b/flower/include/interval.tcc index 7e773e2579..94ad71f578 100644 --- a/flower/include/interval.tcc +++ b/flower/include/interval.tcc @@ -70,6 +70,13 @@ Interval_t::length () const return elem (RIGHT)-elem (LEFT); } +template +T +Interval_t::delta () const +{ + return elem (RIGHT) - elem (LEFT); +} + /** smallest Interval which includes *this and #h# */ diff --git a/lily/grob.cc b/lily/grob.cc index c901e95cac..c6088ff5f1 100644 --- a/lily/grob.cc +++ b/lily/grob.cc @@ -239,7 +239,8 @@ Grob::calculate_dependencies (int final, int busy, SCM funcname) status_c_= busy; - for (SCM d= get_grob_property ("dependencies"); gh_pair_p (d); d = ly_cdr (d)) + for (SCM d = get_grob_property ("dependencies"); gh_pair_p (d); + d = ly_cdr (d)) { unsmob_grob (ly_car (d)) ->calculate_dependencies (final, busy, funcname); @@ -250,9 +251,11 @@ Grob::calculate_dependencies (int final, int busy, SCM funcname) SCM proc = get_grob_property (s.ch_C ()); if (gh_procedure_p (proc)) gh_call1 (proc, this->self_scm ()); + else if (gh_list_p (proc)) + for (SCM i = proc; gh_pair_p (i); i = ly_cdr (i)) + gh_call1 (ly_car (i), this->self_scm ()); status_c_= final; - } Molecule *