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).
  • Added NOLINT sections for clang-tidy to union struts (parsing logic gets confused otherwise).

@Repiteo Repiteo requested review from a team as code owners May 17, 2024 19:17
@AThousandShips AThousandShips added this to the 4.x milestone May 18, 2024
@Repiteo Repiteo force-pushed the core/constexpr-math-constructors branch 2 times, most recently from a80e2e7 to 612122f Compare June 18, 2024 16:55
@Repiteo
Copy link
Contributor Author

Repiteo commented Jun 18, 2024

While rebasing, I made one more adjustment: adding NOLINT sections for clang-tidy, as the union sections otherwise confuse the parsing logic.

@Repiteo Repiteo removed request for a team June 18, 2024 16:56
@Repiteo Repiteo force-pushed the core/constexpr-math-constructors branch from 612122f to ab13533 Compare August 9, 2024 15:18
@Repiteo Repiteo force-pushed the core/constexpr-math-constructors branch from ab13533 to 1680605 Compare October 21, 2024 14:32
@Repiteo Repiteo requested review from a team as code owners October 21, 2024 14:32
@Repiteo Repiteo removed request for a team October 21, 2024 14:34
@Repiteo Repiteo modified the milestones: 4.x, 4.4 Oct 21, 2024
@Repiteo Repiteo force-pushed the core/constexpr-math-constructors branch from 1680605 to cd803bc Compare November 1, 2024 16:04
@Repiteo Repiteo force-pushed the core/constexpr-math-constructors branch from af34c6d to 508e257 Compare November 26, 2024 02:27
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.

2 participants