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

Add InputMap::clear #427

Merged
merged 1 commit into from
Dec 12, 2023
Merged

Add InputMap::clear #427

merged 1 commit into from
Dec 12, 2023

Conversation

Shatur
Copy link
Collaborator

@Shatur Shatur commented Dec 12, 2023

Sometimes it's useful to reset all mappings and re-populate it from scratch. Instead of creating a new InputMap, it's better to reuse the allocated memory.

@Shatur
Copy link
Collaborator Author

Shatur commented Dec 12, 2023

Looks like CI fails, but I don't think it's related.

Copy link
Contributor

@alice-i-cecile alice-i-cecile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfectly sensible, thanks!

@@ -1,5 +1,9 @@
# Release Notes

## Unreleased

- Added `InputMap::Clear`.
Copy link
Contributor

@alice-i-cecile alice-i-cecile Dec 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Added `InputMap::Clear`.
- Added `InputMap::clear`, which works like the `HashMap` equivalent.

@alice-i-cecile alice-i-cecile merged commit 42e2fed into Leafwing-Studios:main Dec 12, 2023
3 of 4 checks passed
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