Re: Issue 5336: Remove downcasting methods from Grob_array and Grob_info (issue 344010043 by nine.fierce.ball...@gmail.com)

2018-06-11 Thread nine . fierce . ballads
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

Re: Issue 5336: Remove downcasting methods from Grob_array and Grob_info (issue 344010043 by nine.fierce.ball...@gmail.com)

2018-06-11 Thread nine . fierce . ballads
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:

Issue 5336: Remove downcasting methods from Grob_array and Grob_info (issue 344010043 by nine.fierce.ball...@gmail.com)

2018-06-11 Thread Carl . D . Sorensen
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

issue #5341: Urgent corrections to stencil-integral.cc (skylines) (issue 341350043 by torsten.haemme...@web.de)

2018-06-11 Thread torsten . haemmerle
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

Re: issue 5319: Make skylines reflect grob rotation (issue 342060043 by torsten.haemme...@web.de)

2018-06-11 Thread Torsten Hämmerle
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

Re: issue 5319: Make skylines reflect grob rotation (issue 342060043 by torsten.haemme...@web.de)

2018-06-11 Thread David Kastrup
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. > >

Re: issue 5307: Skyline Refinements (Rounded Boxes and Rotated Ellipses) (issue 341140043 by torsten.haemme...@web.de)

2018-06-11 Thread Torsten Hämmerle
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,

Re: issue 5319: Make skylines reflect grob rotation (issue 342060043 by torsten.haemme...@web.de)

2018-06-11 Thread Torsten Hämmerle
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