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: Add constexpr constructors to math structs #92059

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Repiteo
Copy link
Contributor

@Repiteo Repiteo commented May 17, 2024

Subsection of #91992

I quickly realized the scope of adding constexpr to math structs, even at a reduced scope, made for a pretty daunting and exhaustive changelog overall. So instead, this aims to be a significantly reduced version of the original commit by focusing exclusively on constructors. In the interest of keeping the changecount as low as possible, no attempts were made to reorganize the structs from how they are now. Absolutely no other functions were made constexpr; if a constructor relied on other functions in their constructors, they simply weren't converted.

The only changes outside of constructors were:

  • Removing redundant variables (would cause warnings/errors in GCC).
  • Removing Projection's empty destructor.
  • Changing Vector2/Vector2i's union struct layout from 2 layers of nesting to 1 (intellisense throws a fit otherwise).

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.

None yet

2 participants