You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-12 13:20:55 +00:00
Merge pull request #86015 from kitbdev/array-initializer-list
Add list initialization to Array, Variant, and TypedArray
This commit is contained in:
@@ -909,6 +909,12 @@ Array::Array(const Array &p_from) {
|
||||
_ref(p_from);
|
||||
}
|
||||
|
||||
Array::Array(std::initializer_list<Variant> p_init) {
|
||||
_p = memnew(ArrayPrivate);
|
||||
_p->refcount.init();
|
||||
_p->array = Vector<Variant>(p_init);
|
||||
}
|
||||
|
||||
Array::Array() {
|
||||
_p = memnew(ArrayPrivate);
|
||||
_p->refcount.init();
|
||||
|
||||
Reference in New Issue
Block a user