Repository navigation
chore: remove unused code, unreachable branches and duplicates - #512
Merged
Merged
Conversation
- Remove unused code: Polynom, the capacity tables and VersionInfo, ECCInfo's Version and ErrorCorrectionLevel, the short rMQR SelectVersion overloads, IsValidISO88591(string) and TryGetAlphanumericValue. - Remove unreachable branches: the Chien search now stops at the L-th root, and Numeric and Alphanumeric no longer check the bits that remain in each group. Also removed: the AVX2 Rgb24 scalar tail, a redundant Math.Min, a virtual pixel in the alignment row scan, and the BOM compare in the FNC1 Latin loops. - Share duplicates: byte widening, the luminance size check, ECI-to-charset mapping, the Micro QR format words, the SymbolRenderer draw path, and the SWAR numeric group with the alphanumeric table. The 16-bit Structured Append lane walk is now one implementation for NEON and the portable vectors. - Collapse the nested NET10 guards and SIMD_SUPPORTED into NET8. Code size is unchanged on x64 JIT. NativeAOT is unchanged on x64 and identical instruction for instruction on ARM64. Benchmarks stay within 10 % on x64 and 2 % on WASM. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <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.
Summary
Removes dead code, unreachable branches and duplicated logic from the library internals. Public API and output are unchanged.
Intent
An audit found code that no caller reaches, branches whose condition is always false or always true, and several copies of the same logic across the three symbologies. Each one costs reading and maintenance time, and gives nothing at run time. This PR keeps only the code that runs.
Before / After
#ifguardsNET10guards andSIMD_SUPPORTEDNET8only (same code on every target framework)Changes
PolynomVersionInfoECCInfo.VersionandECCInfo.ErrorCorrectionLevelSelectVersionoverloadsIsValidISO88591(string)TryGetAlphanumericValueMath.Min, a virtual pixel in the alignment row scan, and the BOM compare in the FNC1 Latin loops.SymbolRendererdraw pathNET10guards andSIMD_SUPPORTEDare nowNET8guards.Testing
🤖 Generated with Claude Code