From 74bf8c7f417710671f78e15f61d3014fac64b6fa Mon Sep 17 00:00:00 2001 From: hanwen Date: Thu, 15 Jan 2004 18:26:40 +0000 Subject: [PATCH] (typeset_grob): warn if adding twice. --- ChangeLog | 2 ++ lily/grob.cc | 2 +- lily/system.cc | 5 +++-- 3 files changed, 6 insertions(+), 3 deletions(-) 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)) -- 2.39.2