[BUG]: bodyTypeEngine discards computed adaptiveFactor — Math.min/Math.max result never assigned (dead code)#1000
Open
vipul674 wants to merge 1 commit into
Open
Conversation
Line computed clamped value but never assigned it — result discarded. Actual adaptiveFactor is computed from smoothed averages later so this had no runtime effect beyond dead computation. Closes Somil450#945
|
@vipul674 is attempting to deploy a commit to the somiljain2024-4175's projects Team on Vercel. A member of the Team first needs to authorize it. |
Author
|
@Somil450 Please review this PR. |
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.
Description
Line 97 called
Math.min(1.1, Math.max(0.9, rawFactor))but never assigned the result to a variable. The clamped value was discarded immediately. The actualsmoothedAdaptiveFactoris correctly computed from averaged ratios at line 122-123.Fix
Removed the dead line. No behavior change — the unused computation was already a no-op.
Changes
src/services/bodyTypeEngine.ts: Removed unassigned Math.min/Math.max callCloses #945