-
Notifications
You must be signed in to change notification settings - Fork 305
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
refactor: Transcript handled through shared_ptr #3434
Merged
Merged
Changes from 10 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
32c97b0
Do it
codygunton 62a9caa
Fix formatting error.
codygunton 7b8d377
Manually format for some reason?
codygunton 970b86c
Fix segfaults.
codygunton 7b305b9
shared_ptr in protogalaxy
codygunton 787e050
Merge remote-tracking branch 'origin/master' into cg/shared_ptr-to-tr…
codygunton 94c0858
Clean up
codygunton 3507874
Clean up
codygunton aec1f9a
Merge remote-tracking branch 'origin/master' into cg/shared_ptr-to-tr…
codygunton b8f7e63
Merge remote-tracking branch 'origin/master' into cg/shared_ptr-to-tr…
codygunton 0fd783c
Pass shared_ptrs by const&
codygunton 7351ae2
Respond to Luke
codygunton 44c3133
Try revert to fix gcc warning.
codygunton 1263a37
Merge remote-tracking branch 'origin/master' into cg/shared_ptr-to-tr…
codygunton ffd5634
Revert "Try revert to fix gcc warning."
codygunton 9bab13e
Fix after merge
codygunton fdd9723
Try to fix uninitialized warning?
codygunton File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
It's a mouthful, but the more common idiom is to pass
const std::shared_ptr&
and avoid the ref copy. I don't think it matters for performance, but just pointing out the 'idiom aligns with performance' traitThere 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.
But don't we explicitly want the ref copy? Otherwise the smart pointer doesn't know how to be smart, no?
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.
you get this if you don't use const & for example
https://stackoverflow.com/a/8741626
it's a pointer that can be refcounted. But normal RAII usage doesn't need the mechanism
enter a function +1 ref
exit -1 ref
ref can never be below 0, therefore unneeded refcounts