refactoring: positioning of mixed_checker addressing duplicateExpression warning #3366
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.
This pull request addresses a code clarity enhancement in the file
graphics.c
where theyarr
array is utilized to store y-coordinates for drawing polygons. The modification aims to improve the understanding of the code by adjusting the assignment of values toyarr[2]
based on the parity of the loop index.Reasons:
Correction for Checkerboard Pattern: In the context of the surrounding code, this adjustment ensures the correct positioning of the checkerboard pattern by modifying the calculation of the y-coordinate.
Code Clarity: The change is made to address the
duplicateExpression
warning flagged by cppcheck and to enhance the clarity of the code.Coding Standards: Additionally, the modified code adheres to the existing coding standards.
Testing:
Manual testing has been performed both before and after making the changes to ensure that the behavior of the code remains unchanged.
A screenshot of the changes made is attached to provide a visual reference for the modification.