-
-
Notifications
You must be signed in to change notification settings - Fork 642
Add support for initializer_list
to Array and TypedArray
#1716
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
Conversation
Hi, and welcome!
|
Yeah I saw those PRs a while back, I wasn't sure if it was a requirement to have it in Godot first, either way, I don't mind waiting, at least this PR will be ready to go when we finally get the feature in the Godot codebase. |
Thanks! However, I think we should wait for Godot to merge one of the upstream PRs before merging this one |
godotengine/godot#86015 Has been merged into Godot, can this PR be merged now? |
godotengine/godot#89782 has also been merged, can this PR be merged? 😊 |
In the change to Godot, it added support for initializer list to And, ideally, the implementation should look as similar to Godot's as possible, since |
9ccd6d6
to
944627b
Compare
ae81275
to
69c53a3
Compare
initializer_list
to Array and TypedArray
Added initializer list support to Array and made TypedArray call the Array constructor, how does it look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Looks great :-)
This PR adds support for initializer_list syntax, allowing
TypedArray
s to be assigned more easily, with syntax such as:TypedArray<int> x = { 1, 2, 3 };
Its a nice to have feature that I've found missing while developing gdextensions, I'm also writing a gdscript to gdextension transpiler and this syntax would help to make that possible.