Remove dead code and empty files; widen selftest coverage#33
Merged
Conversation
- Drop Rice::compute_k: it has no callers and used a float k estimator inconsistent with the live integer Rice::adapt_k. - Delete empty placeholder files and remove them from CMake: bit_reader.cpp and logger.cpp (both header-only) and endian.hpp (unused). - Expand `lac_cli selftest` to also round-trip mono and per-block/auto stereo (mode 2), and document why the selftest stays in the CLI. The dead Encoder `order` parameter is intentionally left for #25, where the encoder constructors are reworked; removing it now would shift arguments across ~15 call sites in a way that compiles silently. Refs #30 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Phase 1 cleanup from
docs/refactor-roadmap.md. Removes dead code and empty placeholder files, and widens the CLI selftest to cover the previously-untested mono and per-block (auto) stereo paths.Changes
Rice::compute_k— dead (no callers insrc/ortests/) and it used adoubleestimator inconsistent with the live integerRice::adapt_k.src/codec/bitstream/bit_reader.cpp(BitReader is header-only)src/utils/logger.cpp(Logger is header-only)src/utils/endian.hpp(0 bytes, included nowhere)lac_cli selftestto also round-trip mono and per-block / auto stereo (mode 2), and document why the selftest stays in the CLI (CI smoke test + dependency-free user check).Deferred
Block::Encoder/LAC::Encoderorderparameter is not removed here. It cascades through both encoder constructors,main.cpp, and ~15 call sites with an int→bool / argument-shift hazard that compiles silently. It is better removed in Decompose the monolithic block/frame encode functions #25 (decompose encode), where those constructors are reworked.Verification (local, macOS)
cmakeconfigure + build succeeds.ctest: 2/2 suites pass.lac_cli selftest: passes, now exercising LR, MS, auto-stereo, and mono.Refs #30