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
Medical Vitals - Extract update logic to separate functions #10566
base: master
Are you sure you want to change the base?
Medical Vitals - Extract update logic to separate functions #10566
Changes from 3 commits
4a63b97
dee674b
d248f18
a2cae4e
84b8b76
2a16a5d
302a83c
8cea489
77db3f6
c3119fe
ad79d95
a4c0ffd
4e57482
f66ae18
832571b
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
This file was deleted.
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.
Key can't be an object, you need to use
hashValue
first.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.
Generally not a huge fan of having a global hashmap for this kind of thing:
Why not use an object variable instead? Handles 1) and no longer requires
hashValue _unit
.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.
hashmap is slightly faster (might not be with hashvalue), that was the only incentive. If we don't have to worry about keeping 3rd-party code out of the counter, I'd rather just raise the events outright.
locality change and deletion won't (shouldn't) happen mid-execution, deferred events are still executed on the same frame, so it'll be either before or after handleUnitVitals is executed.
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.
Do that then, makes more sense.