Skip to content

refactor(refcountptr): Simplify RefCountPtr's Create_No_Add_Ref, Create_Add_Ref and add Assign_No_Add_Ref, Assign_Add_Ref - #3058

Merged
xezon merged 3 commits into
TheSuperHackers:mainfrom
xezon:xezon/simplify-refcountptr
Aug 5, 2026
Merged

refactor(refcountptr): Simplify RefCountPtr's Create_No_Add_Ref, Create_Add_Ref and add Assign_No_Add_Ref, Assign_Add_Ref#3058
xezon merged 3 commits into
TheSuperHackers:mainfrom
xezon:xezon/simplify-refcountptr

Conversation

@xezon

@xezon xezon commented Aug 4, 2026

Copy link
Copy Markdown

This change simplifies RefCountPtr's Create_NoAddRef, Create_AddRef and adds Assign_NoAddRef, Assign_AddRef.

Before

RefCountPtr<AIGroup> ptr = RefCountPtr<AIGroup>::Create_NoAddRef(newInstance(AIGroup));

After

RefCountPtr<AIGroup> ptr = Create_NoAddRef(newInstance(AIGroup));

or

RefCountPtr<AIGroup> ptr;
ptr.Assign_NoAddRef(newInstance(AIGroup));

TODO

  • Replicate in Generals

…_AddRef and add Assign_NoAddRef, Assign_AddRef
@xezon xezon added Minor Severity: Minor < Major < Critical < Blocker Refactor Edits the code with insignificant behavior changes, is never user facing labels Aug 4, 2026

@Skyaero42 Skyaero42 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

looks good

Comment thread Core/Libraries/Source/WWVegas/WWLib/ref_ptr.h Outdated
@xezon

xezon commented Aug 5, 2026

Copy link
Copy Markdown
Author

Replicated in Generals without conflicts.

@xezon xezon changed the title refactor(refcountptr): Simplify RefCountPtr's Create_NoAddRef, Create_AddRef and add Assign_NoAddRef, Assign_AddRef refactor(refcountptr): Simplify RefCountPtr's Create_No_Add_Ref, Create_Add_Ref and add Assign_No_Add_Ref, Assign_Add_Ref Aug 5, 2026
@xezon
xezon merged commit c30b17b into TheSuperHackers:main Aug 5, 2026
16 checks passed
@xezon
xezon deleted the xezon/simplify-refcountptr branch August 5, 2026 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Minor Severity: Minor < Major < Critical < Blocker Refactor Edits the code with insignificant behavior changes, is never user facing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants