Add support for initializer_list to Array and TypedArray - #1716
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? |
dsnopek
left a comment
There was a problem hiding this comment.
Thanks! Looks great :-)
|
Cherry-picked for 4.4 in PR #1805 |
This PR adds support for initializer_list syntax, allowing
TypedArrays 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.