Skip to content
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

COMMON: Try get functionality for HashMap and ConfMan #2518

Merged
merged 2 commits into from Oct 17, 2020
Merged

Conversation

@henke37
Copy link
Contributor

@henke37 henke37 commented Oct 13, 2020

Makes for simpler/more efficient code when keys are optional.

Saves having to check for the key existing and then fetching the element at that key, which is two searches in the hashmap and two function calls in the code using the map.

@henke37 henke37 force-pushed the henke37:tryGet branch from 9aa726e to 2a6b65e Oct 17, 2020
@sev-
Copy link
Member

@sev- sev- commented Oct 17, 2020

Thanks!

@sev- sev- merged commit ee4799c into scummvm:master Oct 17, 2020
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
deepcode-ci-bot Well done, no issues found!
Details
@henke37 henke37 deleted the henke37:tryGet branch Oct 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.