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.
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
Add Priority Queue library to sdk #6664
Add Priority Queue library to sdk #6664
Changes from 13 commits
561ce7b
4f6e85c
d61d162
d7e72bc
60f24bc
e684708
dd454e5
97ac24c
f6ed9b9
41ffc88
fbca439
5eb067c
47b4a4d
61c7533
43e59b1
c2e9dfd
49979c2
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Should this be a pointer to the queue instead of the queue object? I see other places where you just pass the reference and that could just be stored here.
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.
So that I understand what you're asking, are the other places heap methods like
heap.Init(&pq.data)
andheap.Pop(&pq.data).(*Item)
, and you're asking if we makedata
a*queue
instead ofqueue
, so those calls areheap.Init(pq.data)
et. al?Assuming that's what you're asking, is there an advantage to doing that? I'm not opposed to it I'm just curious of the benefits.
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.
I'm fine either way, it just seems that you are always using the reference to it in all calls instead of just storing the reference and just using it directly. It is really just a stylistic thing. If I see a bunch of
&
for the same thing, I start digging into the implementation.