Skip to content
Snippets Groups Projects

Rework ownership of Trk::Track::m_trackSummary

In the existing code base, this member is a raw pointer with assumed ownership, and there is also a data hiding problem since the TrackSummaryTool is marked as a friend class of Track. This commit fixes several minor issues with this data member:

  1. The member is converted to a std::unique_ptr, instead of a raw pointer. This makes the ownership mechanics clearer, and saves us a few deletes here and there.

  2. All instances where the data member was being accessed outside of the class have been replaced with a setter method.

  3. The existing setter method was changed to accept a std::unique_ptr, in accordance with the data member itself.

  4. Trk::TrackSummaryTool was removed as a friend class of Trk::Track.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading