- Description has changed:

Diff:

~~~~



~~~~

- **Needs**:  -->  
- **Patch**: new --> review
- **Comment**:

Passes make, make check and a full make doc



---

** [issues:#5732] Use unique_ptr in layout code**

**Status:** Started
**Created:** Mon Feb 03, 2020 05:37 PM UTC by Dan Eble
**Last Updated:** Mon Feb 03, 2020 05:37 PM UTC
**Owner:** Dan Eble


Use std::unique_ptr instead of manually managed raw pointers.

I suggest beginning the review in Accidental_placement_entry.  The
algorithm in stagger_apes () took me the most time to come to term
with.  With unique_ptr, it's much easier to be confident that there
isn't a memory leak there.

unique_ptr deletes its object when it goes out of scope.  Transferring
ownership of the object to another instance of unique_ptr is done with
std::move().  A unique_ptr can not be copied, but one can get an alias
(a raw pointer) from it with p.get().

Using unique_ptr makes the flower junk_pointers() function
unnecessary.  I can't remove junk_pointers() yet because MIDI code
still uses it, and I don't want to wade into that high water now.

I'm aware that some lines are longer than 80 characters.  I plan to
try clang-format after Han-Wen's config file makes it through the
countdown.

https://codereview.appspot.com/573500043


---

Sent from sourceforge.net because testlilyissues-a...@lists.sourceforge.net is 
subscribed to https://sourceforge.net/p/testlilyissues/issues/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/testlilyissues/admin/issues/options.  Or, if this is 
a mailing list, you can unsubscribe from the mailing list.
_______________________________________________
Testlilyissues-auto mailing list
testlilyissues-a...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/testlilyissues-auto
  • ... Auto mailings of changes to Lily Issues via Testlilyissues-auto via Automated messages for lilypond development
    • ... Auto mailings of changes to Lily Issues via Testlilyissues-auto via Automated messages for lilypond development
    • ... Auto mailings of changes to Lily Issues via Testlilyissues-auto via Automated messages for lilypond development
    • ... Auto mailings of changes to Lily Issues via Testlilyissues-auto via Automated messages for lilypond development
    • ... Auto mailings of changes to Lily Issues via Testlilyissues-auto via Automated messages for lilypond development

Reply via email to