-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use std::make_(shared|unique) #23757
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice cleanup 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
definitely +1
cf81ff7
to
12a0af8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, nice cleanup
You may want to take a look at master...Rechi:xbmc:clang-tidy/modernize-make-shared_unique. |
Is that pr'd? It is way more complete than this one so it should be merged
instead, no?
ons. 13. sep. 2023, 15:07 skrev Rechi ***@***.***>:
… You may want to take a look at
master...Rechi:xbmc:clang-tidy/modernize-make-shared_unique
<master...Rechi:xbmc:clang-tidy/modernize-make-shared_unique>
.
It includes all clang-tidy modernize-make-shared and modernize-make-unique
fixes for Android, iOS, Linux, macOS and tvOS.
—
Reply to this email directly, view it on GitHub
<#23757 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABMS2YHP746TE6LKT3O3IKTX2GV2LANCNFSM6AAAAAA4VETQHA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I haven't pr'd it yet. Either you can pick the commits or, if desired, I'll create a PR. |
Is this preferred over #23904? |
No use the complete one
fre. 13. okt. 2023, 01:11 skrev Garrett Brown ***@***.***>:
… Is this preferred over #23757 <#23757>?
—
Reply to this email directly, view it on GitHub
<#23757 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABMS2YFJ7FOXPTWRLV5PZNTX7B2KJAVCNFSM6AAAAAA4VETQHCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONRQGUYDCMRVGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
#23904 was merged. Do we still want the remaining parts of this PR? |
@notspiff I think the three removal commits are still valuable if you want to rebase the smart pointer commit out. |
these were rendered unnecessary when destructor was moved to translation unit in eecc666
12a0af8
to
2bb4996
Compare
done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR is now mostly only removed code, so should be safe for v21.
Description
Use std::make_shared / std::make_unique instead of .reset(new xxx)
Plus two drive-by cleanups for headers and a unused function.
Motivation and context
More expressive, for instance you can tell from call sites whether
it is a shared or unique ptr.
How has this been tested?
It builds
What is the effect on users?
None
Types of change
Checklist: