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

Improve findClosestMapping #50

Merged
merged 8 commits into from
Feb 8, 2021
Merged

Improve findClosestMapping #50

merged 8 commits into from
Feb 8, 2021

Conversation

DeMoorJasper
Copy link
Member

@DeMoorJasper DeMoorJasper commented Feb 7, 2021

This PR improves the findClosestMapping logic to return null if no mapping is found instead of returning the -1 mapping and no longer use a binary search but instead use the lower_bound util that is part of CPP.

This PR also ensures mappings are sorted before finding closest mapping, further increasing reliability.

@height
Copy link

height bot commented Feb 7, 2021

Link Height tasks by mentioning a task ID in the pull request title or description, commit messages, or comments.

💡Tip: You can also use "Close T-X" to automatically close a task when the pull request is merged.

@DeMoorJasper DeMoorJasper merged commit 0a0cbfc into master Feb 8, 2021
@DeMoorJasper DeMoorJasper deleted the segfaul branch February 8, 2021 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants