lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Re: Duration dots and Bar lines on custom Staves.


From: Neil Puttock
Subject: Re: [PATCH] Re: Duration dots and Bar lines on custom Staves.
Date: Sun, 10 Aug 2008 01:06:35 +0100

2008/8/9 Han-Wen Nienhuys <address@hidden>:
> This does not make sense to me at all.  line-positions is a property
> of the staff symbol, as is line-count.  If someone is calling
>
>  Staff_symbol::on_line(x, y)
>
> where x is not in fact the staff-symbol, then that is an error in the caller.

It's only called indirectly through Staff_symbol_referencer::on_line ().

Before the patch was applied, Staff_symbol_referencer::on_line ()
looked like this:

bool
Staff_symbol_referencer::on_line (Grob *me, int pos)
{
   int sz = line_count (me) - 1;
   return ((pos + sz) % 2) == 0;
}

Though it's called by objects which aren't staff-symbol,
Staff_symbol_referencer::line_count () made sure it retrieved the
staff-symbol, if present:

int
Staff_symbol_referencer::line_count (Grob *me)
{
   Grob *st = get_staff_symbol (me);
   return st ? Staff_symbol::line_count (st) : 0;
}

Regards,
Neil




reply via email to

[Prev in Thread] Current Thread [Next in Thread]