lilypond-devel
[Top][All Lists]
Advanced

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

Re: Uses derived_mark to avoid segfault (issue 5729051)


From: mtsolo
Subject: Re: Uses derived_mark to avoid segfault (issue 5729051)
Date: Sun, 04 Mar 2012 21:12:30 +0000

On 2012/03/04 20:59:22, Keith wrote:

http://codereview.appspot.com/5729051/diff/6001/lily/span-bar-stub-engraver.cc
File lily/span-bar-stub-engraver.cc (right):


http://codereview.appspot.com/5729051/diff/6001/lily/span-bar-stub-engraver.cc#newcode46
lily/span-bar-stub-engraver.cc:46: be engraved in contexts where
BarLines are
engraved.
So, in the example with the piano staff earlier in the comment,
Four SpanBarStubs are /created/ at each barline,
Two are /engraved/ (those in the Lyrics and Dynamics context which
have the
Pure_from_neightbor_engraver, but not those in the Staffs which have
the
Bar_line_engraver) and
Zero are printed.

Right?

Close.
Two are created, two are engraved, and 0 are printed.  The
Pure_from_neighbor_engraver would catch them in Staves too, but they are
not sent to staves or anything else that has BarLines, as BarLines
fulfill the role of SpanBarStubs in contexts that have them.  The line
that makes sure that contexts with barlines do not get SpanBarStubs is:

find (bar_axis_indices.begin (), bar_axis_indices.end (), j) ==
bar_axis_indices.end ()

Or, in other words, only create the grob (and thus do the engraving) if
the context's index is not in the list of indices of contexts that have
bar lines (== bar_axis_indices.end () is another way of saying that it
is not in the vector, so find returns a pointer to the vector's end).

http://codereview.appspot.com/5729051/



reply via email to

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