On 2020/02/03 18:53:45, Dan Eble wrote:
>
https://codereview.appspot.com/573500043/diff/561420043/lily/system-start-delimiter-engraver.cc
> File lily/system-start-delimiter-engraver.cc (right):
> 
>
https://codereview.appspot.com/573500043/diff/561420043/lily/system-start-delimiter-engraver.cc#newcode149
> lily/system-start-delimiter-engraver.cc:149: (new
Bracket_nesting_staff (0)));
> On 2020/02/03 17:57:52, hahnjo wrote:
> > Can you check if
> > children_.emplace_back (new Bracket_nesting_staff (0));
> > works? This would be much neater
> 
> It compiles, but it raises its own flag to reviewers because it does
not show
> that the new object is managed by a smart pointer.

Fair point. That was already settled in my head, but probably only
because of the context.

> If I had C++14, I would have used
std::make_unique<Bracket_nesting_staff> (0) to
> avoid repeating the class name.  We can define our own make_unique if
we want
> to, but I don't think it should be done in this patch.

Agreed.

https://codereview.appspot.com/573500043/

Reply via email to