Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

minor: constify MatchState* parameter when possible #2797

Merged
merged 1 commit into from
Sep 23, 2021
Merged

minor: constify MatchState* parameter when possible #2797

merged 1 commit into from
Sep 23, 2021

Conversation

Cyan4973
Copy link
Contributor

@Cyan4973 Cyan4973 commented Sep 23, 2021

turns out, it's possible to constify ZSTD_matchState_t* argument
in some parts of the binary tree algorithm,
making it a pure read-only parameter,
as opposed to a mutable state.

This is supposed to be helpful for both maintenance and compiler's optimization.

turns out, it's possible to constify MatchState* parameter
in some parts of the binary tree algorithm,
making it a pure read-only parameter,
as opposed to a mutable state.

This is supposed to be helpful for both maintenance and the compiler.
@Cyan4973 Cyan4973 merged commit 9cb5d35 into dev Sep 23, 2021
@Cyan4973 Cyan4973 deleted the btconst branch December 9, 2021 00:14
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants