Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor conditional assignment to use ternary operator #951

Merged

Conversation

vb2ae
Copy link
Member

@vb2ae vb2ae commented Dec 18, 2024

Replaced the if-else statement with a ternary conditional operator for assigning finalValues[i]. This change makes the code more concise by combining the condition and assignment into a single line, improving readability and maintainability.

Replaced the `if-else` statement with a ternary conditional operator for assigning `finalValues[i]`. This change makes the code more concise by combining the condition and assignment into a single line, improving readability and maintainability.
@vb2ae vb2ae linked an issue Dec 18, 2024 that may be closed by this pull request
1 task
@vb2ae vb2ae requested a review from Copilot December 18, 2024 13:09

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

@vb2ae vb2ae merged commit 4457c4e into master Dec 19, 2024
4 checks passed
@vb2ae vb2ae deleted the 950-fix-code-scanning-alert-missed-ternary-opportunity branch January 11, 2025 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix code scanning alert - Missed ternary opportunity
2 participants