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

Add PackedRealArray as an alias for Vector<real_t> #86324

Merged
merged 1 commit into from
Dec 20, 2023

Conversation

aaronfranke
Copy link
Member

This PR adds PackedRealArray as an alias for Vector<real_t> to allow you to specify that you want an array of the float size defined for real_t. While it is possible to use Vector<real_t> in the engine, this is not possible in GDExtension because PackedFloat(32/64)Array are explicit types and not just Vector<T>. We need to provide this alias in both places in order to allow code using it to be compatible with both engine modules and GDExtension.

@aaronfranke aaronfranke requested a review from a team as a code owner December 19, 2023 10:51
@AThousandShips AThousandShips added this to the 4.x milestone Dec 19, 2023
@aaronfranke aaronfranke added the cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release label Dec 19, 2023
Copy link
Contributor

@dsnopek dsnopek left a comment

Choose a reason for hiding this comment

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

This makes sense to me!

@YuriSizov YuriSizov modified the milestones: 4.x, 4.3 Dec 20, 2023
Copy link
Contributor

@YuriSizov YuriSizov left a comment

Choose a reason for hiding this comment

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

Reduz approved.

@YuriSizov YuriSizov merged commit d2da961 into godotengine:master Dec 20, 2023
15 checks passed
@YuriSizov
Copy link
Contributor

Thanks! godotengine/godot-cpp#1340 can now also be merged.

@aaronfranke aaronfranke deleted the really-packed branch December 20, 2023 15:05
@YuriSizov YuriSizov removed the cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release label Jan 25, 2024
@YuriSizov
Copy link
Contributor

Cherry-picked for 4.2.2.

@akien-mga akien-mga changed the title Add PackedRealArray as an alias for Vector<real_t> Add PackedRealArray as an alias for Vector<real_t> Jan 26, 2024
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