Skip to content

Use size field in Bag.size()#10

Merged
jnetu merged 1 commit intomasterfrom
1.7-release
Mar 21, 2026
Merged

Use size field in Bag.size()#10
jnetu merged 1 commit intomasterfrom
1.7-release

Conversation

@jnetu
Copy link
Owner

@jnetu jnetu commented Mar 21, 2026

Fix Bag.size() to return the current number of elements by returning the size field instead of the backing array length. This ensures size() reports the actual element count rather than the array's capacity when the internal buffer has extra space.

Fix Bag.size() to return the current number of elements by returning the size field instead of the backing array length. This ensures size() reports the actual element count rather than the array's capacity when the internal buffer has extra space.
@jnetu jnetu merged commit a50faf8 into master Mar 21, 2026
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.

1 participant