From: hanwen Date: Thu, 15 Jan 2004 18:26:40 +0000 (+0000) Subject: (typeset_grob): warn if adding twice. X-Git-Tag: release/2.1.10~9 X-Git-Url: https://git.donarmstrong.com/lilypond.git?a=commitdiff_plain;h=74bf8c7f417710671f78e15f61d3014fac64b6fa;p=lilypond.git (typeset_grob): warn if adding twice. --- diff --git a/ChangeLog b/ChangeLog index 4e37cb824b..66d7b6f78d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2004-01-15 Han-Wen Nienhuys + * lily/system.cc (typeset_grob): warn if adding twice. + * lily/sequential-iterator.cc (run_always): implement run_always(). * input/mutopia/F.Schubert/standchen.ly: use newaddlyrics. diff --git a/lily/grob.cc b/lily/grob.cc index 3253cd40b1..ffee9d7c3d 100644 --- a/lily/grob.cc +++ b/lily/grob.cc @@ -133,7 +133,7 @@ Grob::Grob (Grob const&s) */ status_ = s.status_; - pscore_ = s.pscore_; + pscore_ = 0; smobify_self (); diff --git a/lily/system.cc b/lily/system.cc index 983555cbe2..a776eeba9a 100644 --- a/lily/system.cc +++ b/lily/system.cc @@ -64,6 +64,9 @@ System::spanner_count () const void System::typeset_grob (Grob * elem) { + if (elem->pscore_) + programming_error ("Adding element twice."); + elem->pscore_ = pscore_; Pointer_group_interface::add_grob (this, ly_symbol2scm ("all-elements"),elem); scm_gc_unprotect_object (elem->self_scm ()); @@ -265,11 +268,9 @@ System::break_into_pieces (Array const &breaking) } } - void System::output_molecule (SCM expr, Offset o) { - while (1) { if (!gh_pair_p (expr))