]> git.ipfire.org Git - thirdparty/zstd.git/commit
constify MatchState* parameter when possible 2797/head
authorYann Collet <cyan@fb.com>
Thu, 23 Sep 2021 15:27:44 +0000 (08:27 -0700)
committerYann Collet <cyan@fb.com>
Thu, 23 Sep 2021 15:27:44 +0000 (08:27 -0700)
commitfa2a4d77c7a97f7beebc4f3ee268526e5e3a29c0
tree815086a05c00a6fee25063497871f8ed0cbf1a37
parentc7afbec4c1a419b95d831a89bd366deec2b9ee99
constify MatchState* parameter when possible

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.
lib/compress/zstd_compress_internal.h
lib/compress/zstd_lazy.c
lib/compress/zstd_opt.c