On Wed, Apr 18, 2012 at 4:56 AM,  <d...@gnu.org> wrote:
> Short of any protests, I think I'll be going with
>
> void
> Part_combine_iterator::derived_mark () const
> {
>  if (first_iter_)
>    scm_gc_mark (first_iter_->self_scm ());
>  if (second_iter_)
>    scm_gc_mark (second_iter_->self_scm ());
>  if (unisono_event_)
>    scm_gc_mark (unisono_event_->self_scm ());
>  if (mmrest_event_)
>    scm_gc_mark (mmrest_event_->self_scm ());
>  if (solo_one_event_)
>    scm_gc_mark (solo_one_event_->self_scm ());
>  if (solo_two_event_)
>    scm_gc_mark (solo_two_event_->self_scm ());
> }
>
> All the rest is too smart for its own good.

FYI,  my experience is that writing this type of code involves cut &
paste, and it is easy to make errors like

 if (some_new_event_)
   mark(the_event_i_copied_it_from_)

I agree that 4 is borderline small enough not to use a loop.

-- 
Han-Wen Nienhuys - han...@xs4all.nl - http://www.xs4all.nl/~hanwen

_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to