File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
include/godot_cpp/variant Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,12 @@ class TypedArray : public Array {
56
56
_FORCE_INLINE_ TypedArray () {
57
57
set_typed (Variant::OBJECT, T::get_class_static (), Variant ());
58
58
}
59
+ _FORCE_INLINE_ TypedArray (const std::initializer_list<Variant> &p_init) {
60
+ set_typed (Variant::OBJECT, T::get_class_static (), Variant ());
61
+ for (auto &element : p_init) {
62
+ append (element);
63
+ }
64
+ }
59
65
};
60
66
61
67
// specialization for the rest of variant types
@@ -82,6 +88,12 @@ class TypedArray : public Array {
82
88
_FORCE_INLINE_ TypedArray () { \
83
89
set_typed (m_variant_type, StringName (), Variant ()); \
84
90
} \
91
+ _FORCE_INLINE_ TypedArray (const std::initializer_list<Variant> &p_init) { \
92
+ set_typed (m_variant_type, StringName (), Variant ()); \
93
+ for (auto &element : p_init) { \
94
+ append (element); \
95
+ } \
96
+ } \
85
97
};
86
98
87
99
// All Variant::OBJECT types are intentionally omitted from this list because they are handled by
You can’t perform that action at this time.
0 commit comments