2009/5/12 Carl D. Sorensen <[email protected]>:
> I think I need to create chord_name_ in two different places, because in one
> place the event is notes_[0] (if I have a chord), and in the other it's
> rest_event_ (if I have a rest). But all the other stuff can avoid
> duplication, I think.
You could use the conditional operator:
chord_name_ = make_item ("ChordName", rest_ ? rest_->self_scm () :
notes_[0]->self_scm ());
Regards,
Neil
_______________________________________________
lilypond-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-devel