To summarize, the principle I advocate is to establish early what kind
of object you are dealing with, and once you have paid for that
information, retain it as long as you can. In LilyPond it seems I often
see the opposite: casts in the lowest depths of the code.
Regards,
Dan
https://coderevie
Reviewers: carl.d.sorensen_gmail.com,
Message:
My intent was to make it clear to the person using these objects what
is going on.
One thing that was hidden was the extra cost of getting an Item* over
getting a Grob*. Consider this excerpt from the old version of
Dynamic_align_engraver:
cre
I realize this issue has already been pushed and closed. But I have a
question.
What is the harm of having the downcasting in the getter function? An
advantage is that we can change the downcasting in one place if it is
part of the member functions for the class. If not, we have to change
it t
Reviewers: ,
Message:
Please review (ideally DAK)
Thanks,
Torsten
Description:
issue #5341: Urgent corrections to stencil-integral.cc (skylines)
modified: ../lily/stencil-integral.cc
Main correction:
Stencil::skylines_from_stencil
Avoid garbage collection by introducing an SCM variable new
Oui, mon Général ! ;)
Issue #5341 "Urgent corrections to stencil-integral.cc (skylines)" created.
--
Sent from: http://lilypond.1069038.n5.nabble.com/Dev-f88644.html
___
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman
Torsten Hämmerle writes:
> David Kastrup wrote
>> Once you create a smobbed copy, it must be protected from garbage
>> collection.
>> […]
>> However, it seems that uses here are few enough that you can just do
>> SCM q = s->smobbed_copy ();
>> and use unsmob
>>
>> (q) where you now use q.
>
>
>
David Kastrup wrote
> https://codereview.appspot.com/341140043/diff/20001/lily/stencil-integral.cc#newcode393
> lily/stencil-integral.cc:393: for (vsize i = 0; i < (vsize) points.size
> () - 1; i++)
> Why would the last point not be transformed?
Oh, the last point actually is being transformed, be
David Kastrup wrote
> Once you create a smobbed copy, it must be protected from garbage
> collection.
> […]
> However, it seems that uses here are few enough that you can just do
> SCM q = s->smobbed_copy ();
> and use unsmob
>
> (q) where you now use q.
Hi David,
Many thanks for your review a