Skip to content

Manage CCharEntity::PMeritPoints with unique_ptr#7679

Merged
zach2good merged 1 commit intoLandSandBoat:basefrom
AJBats:PMeritPoints_unique_ptr
Jul 9, 2025
Merged

Manage CCharEntity::PMeritPoints with unique_ptr#7679
zach2good merged 1 commit intoLandSandBoat:basefrom
AJBats:PMeritPoints_unique_ptr

Conversation

@AJBats
Copy link
Copy Markdown
Contributor

@AJBats AJBats commented Jul 7, 2025

I affirm:

  • I understand that if I do not agree to the following points by completing the checkboxes my PR will be ignored.
  • I understand I should leave resolving conversations to the LandSandBoat team so that reviewers won't miss what was said.
  • I have read and understood the Contributing Guide and the Code of Conduct.
  • I have tested my code and the things my code has changed since the last commit in the PR and will test after any later commits.

What does this pull request do?

Contributes to #5171 by converting PMeritPoints raw pointer to unique_ptr.

Steps to test these changes

Test1: Added merits to a test character and observed their effect being applied in stats menu.

Test2: Logged in and /shutdown to trigger CCharEntity::~CCharEntity() to observe change of destruction timing for PMeritPoints doesn't impact anything.

@AJBats AJBats marked this pull request as ready for review July 8, 2025 00:45
destroy(UContainer);
destroy(CraftContainer);
destroy(PMeritPoints);
PMeritPoints.reset();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't needed. The point of using unique_ptr is that it'll clear up the underlying object when it is destructed, which is in this scope.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated. I also added a test plan to sanity check the change of member delete order.

Contributes to LandSandBoat#5171 by converting PMeritPoints raw pointer to unique_ptr.
@AJBats AJBats force-pushed the PMeritPoints_unique_ptr branch from d0492f4 to 8b0422d Compare July 9, 2025 00:48
@AJBats
Copy link
Copy Markdown
Contributor Author

AJBats commented Jul 9, 2025

Not sure about this CI signal. xi_search is failing smoke test but the changes never touch xi_search code. Is this something we've seen before on CI? Is this test flaky?

@zach2good zach2good merged commit 70d9182 into LandSandBoat:base Jul 9, 2025
24 of 25 checks passed
@AJBats AJBats deleted the PMeritPoints_unique_ptr branch July 11, 2025 00:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants