lilypond-devel
[Top][All Lists]
Advanced

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

Issue 5732: Use unique_ptr in layout code (issue 573500043 by address@hi


From: jonas . hahnfeld
Subject: Issue 5732: Use unique_ptr in layout code (issue 573500043 by address@hidden)
Date: Mon, 03 Feb 2020 09:57:52 -0800

Just scanned the code, don't take this as a full review.

In general I'm a huge fan of unique_ptrs, it makes memory ownership
semantically clear.


https://codereview.appspot.com/573500043/diff/561420043/lily/beam-quanting.cc
File lily/beam-quanting.cc (right):

https://codereview.appspot.com/573500043/diff/561420043/lily/beam-quanting.cc#newcode1049
lily/beam-quanting.cc:1049: configs.clear ();
I think you don't need this: If a vector goes out of scope, it will call
the destructor of all elements still present.

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)));
Can you check if
children_.emplace_back (new Bracket_nesting_staff (0));
works? This would be much neater

https://codereview.appspot.com/573500043/diff/561420043/lily/system-start-delimiter-engraver.cc#newcode230
lily/system-start-delimiter-engraver.cc:230: (new Bracket_nesting_staff
(0)));
likewise

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



reply via email to

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