[Top][All Lists]

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

Re: Allow override of NoteHead.ledger-positions (issue 295970043 by addr

From: paulwmorris
Subject: Re: Allow override of NoteHead.ledger-positions (issue 295970043 by address@hidden)
Date: Sat, 23 Apr 2016 04:34:43 +0000

Patch set 2, based on David's Feedback.
File lily/ (right):
lily/ int len = scm_to_int (scm_length
On 2016/04/22 08:17:09, dak wrote:
scm_ilength already does scm_to_int.

Ah, thanks for the tip.

But if you are getting the size of the
vector in advance anyway (rather than just do {...} while (scm_is_pair
(posns));), why don't you dimension the vector in advance?

Ok, thanks, I changed it to set the vector size and switched to using
do/while.  But then I thought there must be a helper function for this,
and sure enough there is ly_scm2floatvector in, so I've
used that in patch set 2.

But at any rate, wouldn't it be better to just pass an optional grob
argument to
Staff_symbol::ledger_positions so that this function will extract the
ledger-positions preferably from this extra argument?  That way the
code is all in one place.

That makes sense to me.  I finally got the argument passing working (as
an optional const pointer) ...after a few maddening rounds wrestling
with C++.  Please let me know if there's a better way than what I did.

reply via email to

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