Skip to content

[NFC] Address compiler warnings: C4146 - Another round of use two's complement instead of negation #7567

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

Merged
merged 1 commit into from
Jun 25, 2025

Conversation

alsepkow
Copy link
Contributor

Addresses #7565

A few more instances where we can take advantage of -N being equivalent to (~N + 1)

@alsepkow alsepkow changed the title Address compiler warnings: C4146 - Another round of use two's complement instead of negation [NFC] Address compiler warnings: C4146 - Another round of use two's complement instead of negation Jun 23, 2025
Copy link
Contributor

@tex3d tex3d left a comment

Choose a reason for hiding this comment

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

I feel like there should be an overloaded utility function for this common pattern of "negate unsigned value".

@alsepkow
Copy link
Contributor Author

alsepkow commented Jun 25, 2025 via email

@alsepkow alsepkow merged commit 3e01e8b into microsoft:main Jun 25, 2025
14 checks passed
@github-project-automation github-project-automation bot moved this from New to Done in HLSL Roadmap Jun 25, 2025
@alsepkow alsepkow deleted the user/alsepkow/EO_4146_1 branch June 25, 2025 02:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants