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

Core: Implement a XOR operator for BitField #87831

Merged
merged 1 commit into from
Mar 26, 2024

Conversation

Riteo
Copy link
Contributor

@Riteo Riteo commented Feb 1, 2024

At least the Wayland backend had to do a horrible backwards-and-forwards with casts to achieve a XOR operation, in our case used to get a button difference.

I'm not aware of other uses, but the core chat over RC seemed favourable at a simple operator overload.

I've never worked with core types so tell me if this is a good idea and if so, if this is implemented correctly :D

@Riteo Riteo requested review from a team as code owners February 1, 2024 19:32
Copy link
Member

@AThousandShips AThousandShips left a comment

Choose a reason for hiding this comment

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

LGTM otherwise, and makes a lot of sense

I'd maybe add more operators for completeness, but this one is specifically relevant

core/variant/type_info.h Outdated Show resolved Hide resolved
@akien-mga akien-mga modified the milestones: 4.x, 4.3 Mar 25, 2024
@akien-mga akien-mga merged commit 9335b83 into godotengine:master Mar 26, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants