Re: Add and use a Transform data type (issue 344970043 by d...@gnu.org)

2018-06-22 Thread Hans Åberg
> On 22 Jun 2018, at 14:27, David Kastrup wrote: > > What would that be good for concerning this issue? Only you know that: you did not like the explicit constructor for some reason, but didn't detail. ___ lilypond-devel mailing list lilypond-dev

Re: Add and use a Transform data type (issue 344970043 by d...@gnu.org)

2018-06-22 Thread David Kastrup
Hans Åberg writes: >> On 22 Jun 2018, at 11:09, David Kastrup wrote: >> >> Hans Åberg writes: >> You could also do it as a constructor, if you prefer its syntax and don't mind implementing yet another one: explicit Transform(const Transform *t) ... >>> >>> One can also

Re: Add and use a Transform data type (issue 344970043 by d...@gnu.org)

2018-06-22 Thread Hans Åberg
> On 22 Jun 2018, at 11:09, David Kastrup wrote: > > Hans Åberg writes: > >>> You could also do it as a constructor, if you prefer its syntax and >>> don't mind implementing yet another one: >>> >>> explicit Transform(const Transform *t) ... >> >> One can also use a tag type argument in th

Re: Add and use a Transform data type (issue 344970043 by d...@gnu.org)

2018-06-22 Thread David Kastrup
Hans Åberg writes: >> On 21 Jun 2018, at 00:30, nine.fierce.ball...@gmail.com wrote: > >> Maybe a function would help: >> >>Transform make_transform(const Transform *t) >> { >>return t ? Transform (*t) : Transform (); >> } >> >> You could also do it as a constructor, if

Re: Add and use a Transform data type (issue 344970043 by d...@gnu.org)

2018-06-22 Thread Hans Åberg
> On 21 Jun 2018, at 00:30, nine.fierce.ball...@gmail.com wrote: > Maybe a function would help: > >Transform make_transform(const Transform *t) > { >return t ? Transform (*t) : Transform (); > } > > You could also do it as a constructor, if you prefer its syntax and > d

Re: Add and use a Transform data type (issue 344970043 by d...@gnu.org)

2018-06-21 Thread nine . fierce . ballads
On 2018/06/21 12:07:01, dak wrote: Rework according to Dan's review Noticeably improved. I do prefer the function to the constructor. https://codereview.appspot.com/344970043/ ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu

Re: Add and use a Transform data type (issue 344970043 by d...@gnu.org)

2018-06-21 Thread David Kastrup
Hans Åberg writes: >> On 21 Jun 2018, at 10:48, d...@gnu.org wrote: >> >> I think C++19(?) or so already states that returned classes >> are to be considered initializers rather than temporaries. > > Perhaps this is what you have in mind: C+17 returns prvalues without > creating temporaries; [1]

Re: Add and use a Transform data type (issue 344970043 by d...@gnu.org)

2018-06-21 Thread Hans Åberg
> On 21 Jun 2018, at 10:48, d...@gnu.org wrote: > > I think C++19(?) or so already states that returned classes > are to be considered initializers rather than temporaries. Perhaps this is what you have in mind: C+17 returns prvalues without creating temporaries; [1], first note. 1. https://e

Re: Add and use a Transform data type (issue 344970043 by d...@gnu.org)

2018-06-21 Thread dak
On 2018/06/21 08:48:32, dak wrote: A constructor/function from Transform * seems like a side track when the only use case is conversion from SCM. A constructor avoids an extra copy (but I think C++19(?) or so already states that returned classes are to be considered initializers rather th

Re: Add and use a Transform data type (issue 344970043 by d...@gnu.org)

2018-06-21 Thread dak
https://codereview.appspot.com/344970043/diff/40001/lily/include/transform.hh File lily/include/transform.hh (right): https://codereview.appspot.com/344970043/diff/40001/lily/include/transform.hh#newcode52 lily/include/transform.hh:52: Transform (Offset p0) On 2018/06/20 22:30:07, Dan Eble wrot

Re: Add and use a Transform data type (issue 344970043 by d...@gnu.org)

2018-06-20 Thread nine . fierce . ballads
https://codereview.appspot.com/344970043/diff/40001/lily/include/transform.hh File lily/include/transform.hh (right): https://codereview.appspot.com/344970043/diff/40001/lily/include/transform.hh#newcode52 lily/include/transform.hh:52: Transform (Offset p0) Do you want to allow implicit convers

Re: Add and use a Transform data type (issue 344970043 by d...@gnu.org)

2018-06-17 Thread dak
On 2018/06/17 10:54:38, dak wrote: Right. I haven't rebased this patch yet, but I naturally will have to load up another version for review now that the fix is in master. I actually lean towards doing this in a manner similar to your original approach, namely just using the stencil rotation

Re: Add and use a Transform data type (issue 344970043 by d...@gnu.org)

2018-06-17 Thread dak
Reviewers: Be-3, https://codereview.appspot.com/344970043/diff/1/lily/stencil-integral.cc File lily/stencil-integral.cc (right): https://codereview.appspot.com/344970043/diff/1/lily/stencil-integral.cc#newcode1099 lily/stencil-integral.cc:1099: Offset center (robust_scm2double (scm_cadr (rot),

Add and use a Transform data type (issue 344970043 by d...@gnu.org)

2018-06-17 Thread torsten . haemmerle
https://codereview.appspot.com/344970043/diff/1/lily/stencil-integral.cc File lily/stencil-integral.cc (right): https://codereview.appspot.com/344970043/diff/1/lily/stencil-integral.cc#newcode1099 lily/stencil-integral.cc:1099: Offset center (robust_scm2double (scm_cadr (rot), 0.0), robust_scm2