lilypond-devel
[Top][All Lists]
Advanced

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

Re: Add and use a Transform data type (issue 344970043 by address@hidden


From: nine . fierce . ballads
Subject: Re: Add and use a Transform data type (issue 344970043 by address@hidden)
Date: Wed, 20 Jun 2018 15:30:07 -0700


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 conversion from an Offset to a Transform?
If not, this should be "explicit".

https://codereview.appspot.com/344970043/diff/40001/lily/stencil-integral.cc
File lily/stencil-integral.cc (right):

https://codereview.appspot.com/344970043/diff/40001/lily/stencil-integral.cc#newcode740
lily/stencil-integral.cc:740: if (Transform *tp = unsmob<Transform>
(trans))
You've cleaned up a lot, but this recurring optionality could probably
be improved.  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
don't mind implementing yet another one:

    explicit Transform(const Transform *t) ...

I merely suggest.

https://codereview.appspot.com/344970043/



reply via email to

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