Skip to content

maintain base capacity after IterPop iteration#44

Merged
gammazero merged 2 commits intomainfrom
fix-base-cap
Nov 5, 2025
Merged

maintain base capacity after IterPop iteration#44
gammazero merged 2 commits intomainfrom
fix-base-cap

Conversation

@gammazero
Copy link
Copy Markdown
Owner

After iteration of the iterator returned from IterPopFront or IterPopBack, the internal buffer was resized using the default base capacity instead of the specified base capacity, if one was provided to the Deque. This issue does not cause any problems, but may lead to more allocations in cases where a larger than default base capacity was specified. This change uses the correct base capacity.

After iteration of the iterator returned from IterPopFront or IterPopBack, the internal buffer was resized using the default base capacity instead of the specified base capacity, if one was provided to the Deque. This issue does not cause any problems, but may lead to more allocations in cases where a larger than default base capacity was specified. This change uses the correct base capacity.
@gammazero gammazero merged commit cf96494 into main Nov 5, 2025
2 checks passed
@gammazero gammazero deleted the fix-base-cap branch November 5, 2025 14:28
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