lilypond-devel
[Top][All Lists]
Advanced

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

Re: Fix #5964: MM Rests shouldn’t segfault when there’s no StaffSymbol.


From: nine . fierce . ballads
Subject: Re: Fix #5964: MM Rests shouldn’t segfault when there’s no StaffSymbol. (issue 576090043 by address@hidden)
Date: Fri, 08 May 2020 18:42:54 -0700

https://codereview.appspot.com/576090043/diff/557790043/lily/multi-measure-rest.cc
File lily/multi-measure-rest.cc (right):

https://codereview.appspot.com/576090043/diff/557790043/lily/multi-measure-rest.cc#newcode268
lily/multi-measure-rest.cc:268: bool oneline = (!staff) ||
Staff_symbol::line_positions (staff).size() == 1;
On 2020/05/07 15:12:03, Valentin Villenave wrote:
> On 2020/05/07 12:18:48, Dan Eble wrote:
> > Incidentally, I am surprised to see the amount of work involved in
determining
> > whether the staff has one line.  It's not the kind of thing one
expects to
> > involve heap allocation.
...
> If you have a simpler syntax in mind, please share :-)

I looked around.  This is the only place I found using just the size of
the vector.  I don't think it's worth adding and maintaining a
Staff_symbol::line_count just for this case.

https://codereview.appspot.com/576090043/



reply via email to

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