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

Missing way to get count of elements in Hash. #528

Closed
dedmen opened this issue Oct 15, 2016 · 3 comments
Closed

Missing way to get count of elements in Hash. #528

dedmen opened this issue Oct 15, 2016 · 3 comments
Milestone

Comments

@dedmen
Copy link
Contributor

dedmen commented Oct 15, 2016

CBA Version: 3.1.0.160928 (stable)

Mods:

  • @CBA_A3

Description:
There is currently no function to retrieve the number of elements that are currently in a Hash.

@PabstMirror
Copy link
Contributor

Should just be:
count (_hash select 1)

@bux
Copy link
Contributor

bux commented Oct 15, 2016

A wrapper around doing this would be useful though (in case the hash layout changes)

@dedmen
Copy link
Contributor Author

dedmen commented Oct 15, 2016

I don't think users should have to check how hashes are implemented to get something that every standard c++ container has as method.

Killswitch00 added a commit that referenced this issue Oct 19, 2016
Add function to get size of hashes. Fixes #528
@commy2 commy2 added this to the 3.1.2 milestone Nov 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants