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 IntMap methodmap #2018

Merged
merged 5 commits into from
Oct 31, 2024
Merged

Add IntMap methodmap #2018

merged 5 commits into from
Oct 31, 2024

Conversation

KitRifty
Copy link
Contributor

This is a continuation of #579. In addition to taking the PR comments into account, this also adds IntMap.ContainsKey and IntMap.Clone and updates the tests. Both the StringMap and IntMap tests pass.

Some other notes:

  • Unlike the original PR, I've opted to not rename CellTrie to StringCellTrie and TrieSnapshot to StringTrieSnapshot for review purposes, but I can change it if requested.
  • For the tests, I wasn't sure if I should be using new or old syntax, so if the tests should use the new syntax I'll be happy to update it!

Original PR message:

This patch makes the following changes

  • Refactors StringHashMap to a generic HashMap template
  • Adds the IntHashMap class
  • Adds new IntMap natives
  • Adds IntMap tests to the tries test suite

This does not change the existing Trie API in any way so as to retain backwards compatibility, and all existing and new test suite tests pass.

KitRifty and others added 4 commits July 12, 2023 00:13
This is a continuation of alliedmodders#579.

[HashMap] Adds new IntHashMap and IntMap natives.

This patch makes the following changes
  * Refactors StringHashMap to a generic HashMap template
  * Adds the IntHashMap class
  * Adds new IntMap natives
  * Adds IntMap tests to the tries test suite

[HashMap] Reverted rename of CharsAndLength

[HashMap] Use more descriptive template names

[HashMap] Removed old-style natives

[HashMap] Removed IntHash class

[HashMap] Reverted some search & replace errors

Co-authored-by: Geoffrey McRae <[email protected]>
Copy link
Member

@Headline Headline left a comment

Choose a reason for hiding this comment

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

Hey, cool. Thanks for picking this up.This looks good to take in.

@peace-maker can you give this a look? Seems to me this covers everything

@psychonic psychonic merged commit 34e9605 into alliedmodders:master Oct 31, 2024
4 checks passed
@KitRifty KitRifty deleted the intmap branch November 1, 2024 02:52
@peace-maker
Copy link
Member

Ah sorry, this fell off the stack.
Only thing I'm noticing is the tests could be run in CI in the mock testsuite.

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.

4 participants